Refactored the whole code to a better structure
This commit is contained in:
parent
87cc8ac794
commit
12b865bf17
21 changed files with 473 additions and 257 deletions
|
@ -1,8 +0,0 @@
|
|||
table! {
|
||||
users (id) {
|
||||
id -> Integer,
|
||||
username -> Varchar,
|
||||
is_admin -> Bool,
|
||||
password_hash -> Varchar,
|
||||
}
|
||||
}
|
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue