add working signup + login

This commit is contained in:
sam 2023-09-04 03:33:13 +02:00
parent bc85b7c340
commit d8cb8c8fa8
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
27 changed files with 600 additions and 39 deletions

View file

@ -38,7 +38,31 @@ create table posts (
visibility post_visibility not null
);
create table applications (
id text primary key,
name text not null
);
create table tokens (
id text primary key,
app_id text not null references applications (id) on delete cascade,
user_id text not null references accounts (id) on delete cascade,
scopes text[] not null default array[]::text[],
expires timestamptz not null
);
create table config (
id int primary key not null default 1,
name text not null, -- instance name
admin_id text references blogs (id) on delete set null, -- admin contact
internal_application text references applications (id) on delete set null,
constraint singleton check (id = 1) -- only one config table entry
);
-- +migrate Down
drop table config;
drop table tokens;
drop table applications;
drop table accounts;
drop table blogs;
drop table posts;