feat: GET /users/@me/flags, POST /users/@me/flags
This commit is contained in:
parent
7435604dab
commit
c69c777fc8
5 changed files with 380 additions and 1 deletions
24
scripts/migrate/017_pride_flags.sql
Normal file
24
scripts/migrate/017_pride_flags.sql
Normal file
|
@ -0,0 +1,24 @@
|
|||
-- +migrate Up
|
||||
|
||||
-- 2023-05-09: Add pride flags
|
||||
-- Hashes are a separate table so we can deduplicate flags.
|
||||
|
||||
create table pride_flags (
|
||||
id text primary key,
|
||||
user_id text not null references users (id) on delete cascade,
|
||||
hash text not null,
|
||||
name text not null,
|
||||
description text
|
||||
);
|
||||
|
||||
create table user_flags (
|
||||
id bigint generated by default as identity primary key,
|
||||
user_id text not null references users (id) on delete cascade,
|
||||
flag_id text not null references pride_flags (id) on delete cascade
|
||||
);
|
||||
|
||||
create table member_flags (
|
||||
id bigint generated by default as identity primary key,
|
||||
member_id text not null references members (id) on delete cascade,
|
||||
flag_id text not null references pride_flags (id) on delete cascade
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue