mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-02-27 16:16:36 +00:00
First pass at invite-only migration.
This commit is contained in:
parent
86b2901e8c
commit
b361849902
2 changed files with 30 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
-- This file should undo anything in `up.sql`
|
||||
-- Add columns to site table
|
||||
alter table site drop column require_application;
|
||||
alter table site drop column require_email;
|
||||
alter table site drop column application_question;
|
||||
|
||||
-- Add pending to local_user
|
||||
alter table local_user drop column accepted_application;
|
||||
alter table local_user drop column verified_email;
|
||||
|
||||
drop table registration_application;
|
19
migrations/2021-11-23-153753_add_invite_only_columns/up.sql
Normal file
19
migrations/2021-11-23-153753_add_invite_only_columns/up.sql
Normal file
|
@ -0,0 +1,19 @@
|
|||
-- Add columns to site table
|
||||
alter table site add column require_application boolean not null default false;
|
||||
alter table site add column require_email boolean not null default false;
|
||||
alter table site add column application_question text;
|
||||
|
||||
-- Add pending to local_user
|
||||
alter table local_user add column accepted_application boolean not null default false;
|
||||
alter table local_user add column verified_email boolean not null default false;
|
||||
|
||||
create table registration_application (
|
||||
id serial primary key,
|
||||
local_user_id int references local_user on update cascade on delete cascade not null,
|
||||
answer text not null,
|
||||
acceptor_id int references person on update cascade on delete cascade,
|
||||
accepted boolean not null default false,
|
||||
deny_reason text,
|
||||
published timestamp not null default now(),
|
||||
unique(local_user_id)
|
||||
);
|
Loading…
Reference in a new issue