From 85f49f1c8c8f6fdec192f72380f49e37ae584f21 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 11 Jan 2023 10:48:57 +0100 Subject: [PATCH] add: DB Username Unique + ein paar Datentyp Fehler behoben --- BancaDati.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BancaDati.sql b/BancaDati.sql index 2249260..6c422bc 100644 --- a/BancaDati.sql +++ b/BancaDati.sql @@ -8,8 +8,8 @@ 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*/ + `caloriePerCento` integer(5) NOT NULL, /*Kalorien pro Gramm*/ + `ilPeso` integer(5) NULL, /*Gewicht*/ `prezzo` decimal(4, 2) NOT NULL, /*Preis*/ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -33,8 +33,8 @@ 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*/ + `parolaDordine` varchar(255) NOT NULL, /*Passwort*/ + `nomeUtente` varchar(50) UNIQUE NOT NULL, /*Benutzernamen*/ `gettone` varchar(255), /*Token für Session*/ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8;