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
-- 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` )
);

View File

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