mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
feat: alternate proxy switch mode "add"
This commit is contained in:
parent
2555f7922c
commit
82b57de3e3
9 changed files with 65 additions and 17 deletions
|
|
@ -33,6 +33,6 @@ public class MessageContext
|
|||
public int? LatchTimeout { get; }
|
||||
public bool CaseSensitiveProxyTags { get; }
|
||||
public bool ProxyErrorMessageEnabled { get; }
|
||||
public bool ProxySwitch { get; }
|
||||
public SystemConfig.ProxySwitchAction ProxySwitch { get; }
|
||||
public bool DenyBotUsage { get; }
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ create function message_context(account_id bigint, guild_id bigint, channel_id b
|
|||
latch_timeout integer,
|
||||
case_sensitive_proxy_tags bool,
|
||||
proxy_error_message_enabled bool,
|
||||
proxy_switch bool,
|
||||
proxy_switch int,
|
||||
name_format text,
|
||||
|
||||
tag_enabled bool,
|
||||
|
|
|
|||
11
PluralKit.Core/Database/Migrations/49.sql
Normal file
11
PluralKit.Core/Database/Migrations/49.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- database version 49
|
||||
-- change proxy switch config to an enum
|
||||
|
||||
alter table system_config
|
||||
alter column proxy_switch drop default,
|
||||
alter column proxy_switch type int
|
||||
using case when proxy_switch then 1 else 0 end,
|
||||
alter column proxy_switch set default 0,
|
||||
add constraint proxy_switch_check check (proxy_switch = ANY (ARRAY[0,1,2]));
|
||||
|
||||
update info set schema_version = 49;
|
||||
|
|
@ -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 = 48;
|
||||
private const int TargetSchemaVersion = 49;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public DatabaseMigrator(ILogger logger)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue