mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 22:07:55 +00:00
refactor: refactor migration for adding banner privacy
This commit is contained in:
parent
a0f13b47af
commit
38f4e5d4c3
1 changed files with 3 additions and 7 deletions
|
|
@ -1,13 +1,9 @@
|
|||
-- database version 45
|
||||
-- adds banner privacy
|
||||
|
||||
alter table members add column banner_privacy int not null default 1;
|
||||
alter table groups add column banner_privacy int not null default 1;
|
||||
alter table systems add column banner_privacy int not null default 1;
|
||||
|
||||
alter table members add constraint members_banner_privacy_check check (banner_privacy = ANY (ARRAY[1,2]));
|
||||
alter table groups add constraint groups_banner_privacy_check check (banner_privacy = ANY (ARRAY[1,2]));
|
||||
alter table systems add constraint systems_banner_privacy_check check (banner_privacy = ANY (ARRAY[1,2]));
|
||||
alter table members add column banner_privacy int not null default 1 check (banner_privacy = ANY (ARRAY[1,2]));
|
||||
alter table groups add column banner_privacy int not null default 1 check (banner_privacy = ANY (ARRAY[1,2]));
|
||||
alter table systems add column banner_privacy int not null default 1 check (banner_privacy = ANY (ARRAY[1,2]));
|
||||
|
||||
update members set banner_privacy = 2 where description_privacy = 2;
|
||||
update groups set banner_privacy = 2 where description_privacy = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue