Fixed cleanup migration if there are waifus which don't have a corresponding entry in DiscordUser

This commit is contained in:
Kwoth
2021-11-18 16:41:27 +01:00
parent aa518d60a5
commit bf97cffd84

View File

@@ -16,6 +16,7 @@ namespace NadekoBot.Migrations
migrationBuilder.Sql("DELETE FROM FilteredWord WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)");
migrationBuilder.Sql("DELETE FROM FilterChannelId WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)");
migrationBuilder.Sql("DELETE FROM CommandCooldown WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)");
migrationBuilder.Sql("DELETE FROM WaifuInfo where WaifuId not in (SELECT Id from DiscordUser);");
migrationBuilder.DropColumn(
name: "ChannelCreated",