diff --git a/PluralKit.Core/Database/Migrations/52.sql b/PluralKit.Core/Database/Migrations/52.sql new file mode 100644 index 00000000..db6e7541 --- /dev/null +++ b/PluralKit.Core/Database/Migrations/52.sql @@ -0,0 +1,18 @@ +-- database version 52 +-- messages db updates + +create index concurrently messages_by_original on messages(original_mid); +create index concurrently messages_by_sender on messages(sender); + +create table command_messages ( + mid bigint primary key, + channel bigint not null, + guild bigint not null, + sender bigint not null, + original_mid bigint not null +); + +create index concurrently command_messages_by_original on command_messages(original_mid); +create index concurrently command_messages_by_sender on command_messages(sender); + +update info set schema_version = 52;