From 31b4325296fa16b2f97fbb65d94fad64329085a2 Mon Sep 17 00:00:00 2001 From: Thies Mueller Date: Fri, 8 Jan 2021 15:44:20 +0100 Subject: [PATCH] added username field for later usage and made it unique --- usertable.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usertable.sql b/usertable.sql index 5bc6011..62b44d3 100644 --- a/usertable.sql +++ b/usertable.sql @@ -1,10 +1,11 @@ CREATE TABLE `users` ( `id` INT NOT NULL AUTO_INCREMENT , `email` VARCHAR(255) NOT NULL , + `username` VARCHAR(255) NOT NULL , `password` VARCHAR(255) NOT NULL , `givenName` VARCHAR(255) NOT NULL DEFAULT '' , `lastName` VARCHAR(255) NOT NULL DEFAULT '' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , - PRIMARY KEY (`id`), UNIQUE (`email`) + PRIMARY KEY (`id`), UNIQUE (`email`), UNIQUE (`username`) ) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file