Refactored the whole code to a better structure

This commit is contained in:
Marko Korhonen 2020-04-05 22:53:42 +03:00
parent 87cc8ac794
commit 12b865bf17
No known key found for this signature in database
GPG key ID: 911B85FBC6003FE5
21 changed files with 473 additions and 257 deletions

View file

@ -1,8 +0,0 @@
table! {
users (id) {
id -> Integer,
username -> Varchar,
is_admin -> Bool,
password_hash -> Varchar,
}
}

View file

@ -1,7 +1,8 @@
CREATE TABLE users (
`id` int NOT NULL AUTO_INCREMENT,
`username` varchar(100) UNIQUE NOT NULL,
`is_admin` boolean NOT NULL,
`password_hash` varchar(128) NOT NULL,
`password` varchar(128) NOT NULL,
`admin` boolean NOT NULL,
`created_at` timestamp NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;