From 4869039503494d3ca9a951db3a7d99dc17e4446e Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 19 Oct 2022 16:57:03 +0200 Subject: [PATCH] Fixed auto-role migration #70 --- kdb-bot/src/bot_data/migration/auto_role_migration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kdb-bot/src/bot_data/migration/auto_role_migration.py b/kdb-bot/src/bot_data/migration/auto_role_migration.py index 2294ff95..d46fb363 100644 --- a/kdb-bot/src/bot_data/migration/auto_role_migration.py +++ b/kdb-bot/src/bot_data/migration/auto_role_migration.py @@ -23,7 +23,8 @@ class AutoRoleMigration(MigrationABC): `DiscordMessageId` BIGINT NOT NULL, `CreatedAt` DATETIME(6), `LastModifiedAt` DATETIME(6), - PRIMARY KEY(`AutoRoleId`) + PRIMARY KEY(`AutoRoleId`), + FOREIGN KEY (`ServerId`) REFERENCES `Servers`(`ServerId`) ); """) ) @@ -37,7 +38,8 @@ class AutoRoleMigration(MigrationABC): `DiscordRoleId` BIGINT NOT NULL, `CreatedAt` DATETIME(6), `LastModifiedAt` DATETIME(6), - PRIMARY KEY(`AutoRoleRuleId`) + PRIMARY KEY(`AutoRoleRuleId`), + FOREIGN KEY (`AutoRoleId`) REFERENCES `AutoRoles`(`AutoRoleId`) ); """) )