feat: rewrite user model using diesel
This commit is contained in:
parent
18a321853a
commit
77995ebec9
10 changed files with 97 additions and 17 deletions
|
|
@ -1,13 +1,13 @@
|
|||
create table users (
|
||||
id integer primary key not null,
|
||||
id bigint primary key not null,
|
||||
username text unique not null,
|
||||
password_hash text not null,
|
||||
admin boolean not null
|
||||
);
|
||||
|
||||
create table sessions (
|
||||
id integer primary key not null,
|
||||
user_id integer not null
|
||||
id bigint primary key not null,
|
||||
user_id bigint not null
|
||||
references users (id)
|
||||
on delete cascade,
|
||||
unique (id, user_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue