diff --git a/install/install_action.php b/install/install_action.php index fee8777..a6cd929 100644 --- a/install/install_action.php +++ b/install/install_action.php @@ -107,24 +107,12 @@ CREATE TABLE `RezeptZutat` ( `Zutat` int(11) NOT NULL );"); -array_push($SQLStatements, " -CREATE TABLE `ViewEinkauf` ( - `ID` int(11), - `Anzahl` double, - `Einheit` varchar(255), - `Name` varchar(255), - `Erledigt` tinyint(1) -);"); - array_push($SQLStatements, " CREATE TABLE `Zutat` ( `ID` int(11) NOT NULL, `Name` varchar(255) NOT NULL );"); -array_push($SQLStatements, " -DROP TABLE IF EXISTS `ViewEinkauf`;"); - array_push($SQLStatements, " CREATE VIEW `ViewEinkauf` AS select `Einkauf`.`ID` AS `ID`,`Einkauf`.`Anzahl` AS `Anzahl`,`Einheit`.`Name` AS `Einheit`,`Einkauf`.`Name` AS `Name`,`Einkauf`.`Erledigt` AS `Erledigt` from (`Einkauf` join `Einheit` on((`Einkauf`.`Einheit` = `Einheit`.`ID`))) ;"); @@ -189,7 +177,7 @@ ALTER TABLE `users` "); array_push($SQLStatements, " -ALTER TABLE `sessions` +ALTER TABLE `sessions` ADD CONSTRAINT `fk_session_uid` FOREIGN KEY (`user`) REFERENCES `users` (`uid`);"); array_push($SQLStatements, "