feat: rewrite user model using diesel

This commit is contained in:
Jef Roosens 2025-01-13 13:43:09 +01:00
parent 18a321853a
commit 77995ebec9
No known key found for this signature in database
GPG key ID: 21FD3D77D56BAF49
10 changed files with 97 additions and 17 deletions

View file

@ -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)