From d4e275e28c13b2ff215a25509d8993ce4df8545e Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 11 Jan 2023 10:33:20 +0100 Subject: [PATCH] add: alt + L --- BancaDati.sql | 80 ++++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 36 deletions(-) diff --git a/BancaDati.sql b/BancaDati.sql index 4088403..83292a5 100644 --- a/BancaDati.sql +++ b/BancaDati.sql @@ -1,54 +1,62 @@ -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET time_zone = "+00:00"; +SET +SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET +time_zone = "+00:00"; -CREATE TABLE `ingredienti` ( /*Zutaten*/ - `id` varchar(36) NOT NULL, - `cognome` varchar(200) NOT NULL, /*Name*/ - `caloriePerCento` int(5) NOT NULL, /*Kalorien pro Gramm*/ - `ilPeso` int(5) NULL, /*Gewicht*/ - `prezzo` decimal(4,2) NOT NULL, /*Preis*/ - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +CREATE TABLE `ingredienti` +( /*Zutaten*/ + `id` varchar(36) NOT NULL, + `cognome` varchar(200) NOT NULL, /*Name*/ + `caloriePerCento` int(5) NOT NULL, /*Kalorien pro Gramm*/ + `ilPeso` int(5) NULL, /*Gewicht*/ + `prezzo` decimal(4, 2) NOT NULL, /*Preis*/ + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `folla` ( /*Menge*/ -`id` varchar(36) NOT NULL, -`unita` varchar(200) NOT NULL, /*Einheit*/ -`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +CREATE TABLE `folla` +( /*Menge*/ + `id` varchar(36) NOT NULL, + `unita` varchar(200) NOT NULL, /*Einheit*/ + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `elenco` ( /*Liste*/ -`id` varchar(36) NOT NULL, -`creatore` varchar(200) NOT NULL, /*Ersteller*/ -`coloreDiSfondo` integer(10) NOT NULL, /*Hintergrundfarbe*/ -`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +CREATE TABLE `elenco` +( /*Liste*/ + `id` varchar(36) NOT NULL, + `creatore` varchar(200) NOT NULL, /*Ersteller*/ + `coloreDiSfondo` integer(10) NOT NULL, /*Hintergrundfarbe*/ + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `utente` ( /*Benutzer*/ -`id` varchar(36) NOT NULL, -`email` varchar(200) NOT NULL, /*Email*/ -`parolaDordine` integer(10) NOT NULL, /*Passwort*/ -`nomeUtente` integer(10) NOT NULL, /*Benutzernamen*/ -`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +CREATE TABLE `utente` +( /*Benutzer*/ + `id` varchar(36) NOT NULL, + `email` varchar(200) NOT NULL, /*Email*/ + `parolaDordine` integer(10) NOT NULL, /*Passwort*/ + `nomeUtente` integer(10) NOT NULL, /*Benutzernamen*/ + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `elencoIngredienti` ( /*Liste_Zutaten*/ -`id` varchar(36) NOT NULL, -`ingredientiID` varchar(36) NOT NULL, /*ZutatenID*/ -`elencoID` varchar(36) NOT NULL, /*ListeID*/ -`follaID` varchar(36) NOT NULL, /*MengeID*/ -`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +CREATE TABLE `elencoIngredienti` +( /*Liste_Zutaten*/ + `id` varchar(36) NOT NULL, + `ingredientiID` varchar(36) NOT NULL, /*ZutatenID*/ + `elencoID` varchar(36) NOT NULL, /*ListeID*/ + `follaID` varchar(36) NOT NULL, /*MengeID*/ + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `utenteElenco` ( /*Benutzer_Liste*/ -`id` varchar(36) NOT NULL, -`elencoID` varchar(36) NOT NULL, /*ListeID*/ -`utenteID` varchar(36) NOT NULL, /*BenutzerID*/ -`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +CREATE TABLE `utenteElenco` +( /*Benutzer_Liste*/ + `id` varchar(36) NOT NULL, + `elencoID` varchar(36) NOT NULL, /*ListeID*/ + `utenteID` varchar(36) NOT NULL, /*BenutzerID*/ + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `ingredienti` - ADD PRIMARY KEY (`id`); + ADD PRIMARY KEY (`id`); ALTER TABLE `folla` ADD PRIMARY KEY (`id`);