add: DB Username Unique + ein paar Datentyp Fehler behoben

This commit is contained in:
Don Bock 2023-01-11 10:48:57 +01:00
parent aa90447465
commit 85f49f1c8c

View File

@ -8,8 +8,8 @@ CREATE TABLE `ingredienti`
( /*Zutaten*/ ( /*Zutaten*/
`id` varchar(36) NOT NULL, `id` varchar(36) NOT NULL,
`cognome` varchar(200) NOT NULL, /*Name*/ `cognome` varchar(200) NOT NULL, /*Name*/
`caloriePerCento` int(5) NOT NULL, /*Kalorien pro Gramm*/ `caloriePerCento` integer(5) NOT NULL, /*Kalorien pro Gramm*/
`ilPeso` int(5) NULL, /*Gewicht*/ `ilPeso` integer(5) NULL, /*Gewicht*/
`prezzo` decimal(4, 2) NOT NULL, /*Preis*/ `prezzo` decimal(4, 2) NOT NULL, /*Preis*/
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -33,8 +33,8 @@ CREATE TABLE `utente`
( /*Benutzer*/ ( /*Benutzer*/
`id` varchar(36) NOT NULL, `id` varchar(36) NOT NULL,
`email` varchar(200) NOT NULL, /*Email*/ `email` varchar(200) NOT NULL, /*Email*/
`parolaDordine` integer(10) NOT NULL, /*Passwort*/ `parolaDordine` varchar(255) NOT NULL, /*Passwort*/
`nomeUtente` integer(10) NOT NULL, /*Benutzernamen*/ `nomeUtente` varchar(50) UNIQUE NOT NULL, /*Benutzernamen*/
`gettone` varchar(255), /*Token für Session*/ `gettone` varchar(255), /*Token für Session*/
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;