2021-11-23 16:00:17 +00:00
|
|
|
-- Add columns to site table
|
|
|
|
alter table site add column require_application boolean not null default false;
|
|
|
|
alter table site add column application_question text;
|
2021-12-04 19:40:33 +00:00
|
|
|
alter table site add column private_instance boolean not null default false;
|
2021-11-23 16:00:17 +00:00
|
|
|
|
|
|
|
-- Add pending to local_user
|
|
|
|
alter table local_user add column accepted_application 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,
|
2021-12-04 02:15:20 +00:00
|
|
|
admin_id int references person on update cascade on delete cascade,
|
2021-11-23 16:00:17 +00:00
|
|
|
deny_reason text,
|
|
|
|
published timestamp not null default now(),
|
|
|
|
unique(local_user_id)
|
|
|
|
);
|
2021-12-04 02:15:20 +00:00
|
|
|
|
|
|
|
create index idx_registration_application_published on registration_application (published desc);
|