otter/migrations/2025-02-23-095541_auth/up.sql

14 lines
302 B
SQL

create table users (
id integer 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)
);