feat: add invites to backend
This commit is contained in:
parent
47ed36d24c
commit
6237ea940f
7 changed files with 234 additions and 30 deletions
|
@ -12,7 +12,9 @@ create table users (
|
|||
links text[],
|
||||
|
||||
discord text unique, -- for Discord oauth
|
||||
discord_username text
|
||||
discord_username text,
|
||||
|
||||
max_invites int default 10
|
||||
);
|
||||
|
||||
create table user_names (
|
||||
|
@ -80,3 +82,10 @@ create table member_fields (
|
|||
friends_only text[],
|
||||
avoid text[]
|
||||
);
|
||||
|
||||
create table invites (
|
||||
user_id text not null references users (id) on delete cascade,
|
||||
code text primary key,
|
||||
created timestamp not null default (current_timestamp at time zone 'utc'),
|
||||
used boolean not null default false
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue