new simplified users schema

This commit is contained in:
shockrah 2020-03-07 22:06:03 -08:00
parent 316c409796
commit ec88a08391
2 changed files with 11 additions and 13 deletions

View File

@ -4,10 +4,9 @@
-- password: yea -- password: yea
-- email: used for signing in to the server -- email: used for signing in to the server
CREATE TABLE IF NOT EXISTS `users` ( CREATE TABLE IF NOT EXISTS `users` (
`id` bigint NOT NULL auto_increment, `userid` bigint UNSIGNED NOT NULL auto_increment,
`username` varchar(255) NOT NULL, `username` varchar(255),
`display` varchar(255), `key_hash` varchar(255),
`password` varchar(255) NOT NULL, `date` bigint UNSIGNED NOT NULL,
`email` varchar(255), PRIMARY KEY( `userid` )
PRIMARY KEY( `id` ) );
);

View File

@ -14,12 +14,11 @@ table! {
} }
table! { table! {
users (id) { users (userid) {
id -> Bigint, userid -> Unsigned<Bigint>,
username -> Varchar, username -> Nullable<Varchar>,
display -> Nullable<Varchar>, key_hash -> Nullable<Varchar>,
password -> Varchar, date -> Unsigned<Bigint>,
email -> Nullable<Varchar>,
} }
} }