feat: add user and session models

This commit is contained in:
Jef Roosens 2025-02-23 11:20:25 +01:00
parent eb0b16ea39
commit 67ad8c2b64
No known key found for this signature in database
GPG key ID: 21FD3D77D56BAF49
8 changed files with 328 additions and 1 deletions

View file

@ -0,0 +1,2 @@
drop table sessions;
drop table users;

View file

@ -0,0 +1,13 @@
create table users (
id bigint primary key not null,
username text unique not null,
password_hash text not null
);
create table sessions (
id bigint primary key not null,
user_id bigint not null
references users (id)
on delete cascade,
unique (id, user_id)
);