From 1d80d93b1d59ac510fe7bade85fc42652c1e8816 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 12 Jan 2023 14:43:28 +0100 Subject: [PATCH] add: DB auto_increment --- BancaDati.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BancaDati.sql b/BancaDati.sql index 24b16c9..ad83fa4 100644 --- a/BancaDati.sql +++ b/BancaDati.sql @@ -6,7 +6,7 @@ time_zone = "+00:00"; CREATE TABLE `ingredienti` ( /*Zutaten*/ - `id` varchar(36) NOT NULL, + `id` int auto_increment NOT NULL, `cognome` varchar(200) NOT NULL, /*Name*/ `caloriePerCento` integer(5) NOT NULL, /*Kalorien pro Gramm*/ `ilPeso` integer(5) NULL, /*Gewicht*/ @@ -16,14 +16,14 @@ CREATE TABLE `ingredienti` CREATE TABLE `folla` ( /*Menge*/ - `id` varchar(36) NOT NULL, + `id` int auto_increment 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, + `id` int auto_increment NOT NULL, `creatore` varchar(200) NOT NULL, /*Ersteller*/ `coloreDiSfondo` integer(10) NOT NULL, /*Hintergrundfarbe*/ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP @@ -31,7 +31,7 @@ CREATE TABLE `elenco` CREATE TABLE `utente` ( /*Benutzer*/ - `id` varchar(36) NOT NULL, + `id` int auto_increment NOT NULL, `email` varchar(200) NOT NULL, /*Email*/ `parolaDordine` varchar(255) NOT NULL, /*Passwort*/ `nomeUtente` varchar(50) UNIQUE NOT NULL, /*Benutzernamen*/ @@ -41,7 +41,7 @@ CREATE TABLE `utente` CREATE TABLE `elencoIngredienti` ( /*Liste_Zutaten*/ - `id` varchar(36) NOT NULL, + `id` int auto_increment NOT NULL, `ingredientiID` varchar(36) NOT NULL, /*ZutatenID*/ `elencoID` varchar(36) NOT NULL, /*ListeID*/ `follaID` varchar(36) NOT NULL, /*MengeID*/ @@ -50,7 +50,7 @@ CREATE TABLE `elencoIngredienti` CREATE TABLE `utenteElenco` ( /*Benutzer_Liste*/ - `id` varchar(36) NOT NULL, + `id` int auto_increment NOT NULL, `elencoID` varchar(36) NOT NULL, /*ListeID*/ `utenteID` varchar(36) NOT NULL, /*BenutzerID*/ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP