feat: split ignores into 'ignore messages' and 'ignore entities'

This commit is contained in:
sam 2024-11-18 00:47:27 +01:00
parent d48ab7e16e
commit 0cac964aa6
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
32 changed files with 730 additions and 488 deletions

View file

@ -0,0 +1,12 @@
alter table guilds
add column messages jsonb not null default '{}';
-- Extract the current message-related configuration options into the new "messages" column
-- noinspection SqlWithoutWhere
update guilds
set messages = jsonb_build_object('IgnoredUsers', channels['IgnoredUsers'], 'IgnoredChannels',
channels['IgnoredChannels'], 'IgnoredUsersPerChannel',
channels['IgnoredUsersPerChannel']);
-- We don't update the "channels" column as it will be cleared out automatically over time,
-- as channel configurations are updated by the bot