feat: add user and session entities

This commit is contained in:
Jef Roosens 2025-01-11 16:40:55 +01:00
parent f51b6ce3b3
commit a65b647f65
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
3 changed files with 60 additions and 0 deletions

View file

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