mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): separate banner privacy from description privacy
This commit is contained in:
parent
1b55d1c6a4
commit
cbc5a34dae
26 changed files with 141 additions and 22 deletions
12
PluralKit.Core/Database/Migrations/46.sql
Normal file
12
PluralKit.Core/Database/Migrations/46.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-- database version 45
|
||||
-- adds banner privacy
|
||||
|
||||
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;
|
||||
update systems set banner_privacy = 2 where description_privacy = 2;
|
||||
|
||||
update info set schema_version = 45;
|
||||
|
|
@ -9,7 +9,7 @@ namespace PluralKit.Core;
|
|||
internal class DatabaseMigrator
|
||||
{
|
||||
private const string RootPath = "PluralKit.Core.Database"; // "resource path" root for SQL files
|
||||
private const int TargetSchemaVersion = 45;
|
||||
private const int TargetSchemaVersion = 46;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public DatabaseMigrator(ILogger logger)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue