From ec88a08391f8f1cba400f72a0629a5b91f9cb586 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sat, 7 Mar 2020 22:06:03 -0800 Subject: [PATCH] new simplified users schema --- server/migrations/2020-02-04-083551_users/up.sql | 13 ++++++------- server/src/schema.rs | 11 +++++------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/server/migrations/2020-02-04-083551_users/up.sql b/server/migrations/2020-02-04-083551_users/up.sql index b8c2418..c1438be 100644 --- a/server/migrations/2020-02-04-083551_users/up.sql +++ b/server/migrations/2020-02-04-083551_users/up.sql @@ -4,10 +4,9 @@ -- password: yea -- email: used for signing in to the server CREATE TABLE IF NOT EXISTS `users` ( - `id` bigint NOT NULL auto_increment, - `username` varchar(255) NOT NULL, - `display` varchar(255), - `password` varchar(255) NOT NULL, - `email` varchar(255), - PRIMARY KEY( `id` ) -); + `userid` bigint UNSIGNED NOT NULL auto_increment, + `username` varchar(255), + `key_hash` varchar(255), + `date` bigint UNSIGNED NOT NULL, + PRIMARY KEY( `userid` ) +); \ No newline at end of file diff --git a/server/src/schema.rs b/server/src/schema.rs index a972767..19f217f 100644 --- a/server/src/schema.rs +++ b/server/src/schema.rs @@ -14,12 +14,11 @@ table! { } table! { - users (id) { - id -> Bigint, - username -> Varchar, - display -> Nullable, - password -> Varchar, - email -> Nullable, + users (userid) { + userid -> Unsigned, + username -> Nullable, + key_hash -> Nullable, + date -> Unsigned, } }