1 -- add back old registration columns
2 alter table local_site add column open_registration boolean not null default true;
3 alter table local_site add column require_application boolean not null default true;
5 -- regenerate their values
7 select registration_mode,
9 when registration_mode='closed' then false
15 set open_registration = subquery.case
18 select registration_mode,
20 when registration_mode='open' then false
26 set require_application = subquery.case
29 -- drop new column and type
30 alter table local_site drop column registration_mode;
31 drop type registration_mode_enum;