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, } }