mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Fixed some migration issues which arose due to invalid database state. Upped version to beta3
This commit is contained in:
@@ -13,35 +13,9 @@ namespace NadekoBot.Migrations
|
||||
|
||||
migrationBuilder.Sql("UPDATE Permission SET NextId = NULL;");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Permission");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Stakes");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_GuildConfigs_RootPermissionId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NotifyMessage",
|
||||
table: "XpSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "XpRoleRewardExclusive",
|
||||
table: "XpSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Item",
|
||||
table: "WaifuItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Price",
|
||||
table: "WaifuItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseCount",
|
||||
table: "Quotes");
|
||||
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.DropColumn(
|
||||
name: "ChannelCreated",
|
||||
@@ -107,6 +81,39 @@ namespace NadekoBot.Migrations
|
||||
name: "VoicePresenceChannelId",
|
||||
table: "LogSettings");
|
||||
|
||||
// todo cleanup guildconfigs which have logsettings id set to null
|
||||
migrationBuilder.Sql("UPDATE GuildConfigs SET LogSettingId = null WHERE LogSettingId NOT IN (SELECT Id from LogSettings)");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Permission");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Stakes");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_GuildConfigs_RootPermissionId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NotifyMessage",
|
||||
table: "XpSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "XpRoleRewardExclusive",
|
||||
table: "XpSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Item",
|
||||
table: "WaifuItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Price",
|
||||
table: "WaifuItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseCount",
|
||||
table: "Quotes");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AutoAssignRoleId",
|
||||
table: "GuildConfigs");
|
||||
|
@@ -19,7 +19,7 @@ namespace NadekoBot.Services
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly DateTime _started;
|
||||
|
||||
public const string BotVersion = "3.0.0-beta2";
|
||||
public const string BotVersion = "3.0.0-beta3";
|
||||
public string Author => "Kwoth#2452";
|
||||
public string Library => "Discord.Net";
|
||||
|
||||
|
Reference in New Issue
Block a user