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,36 +13,10 @@ namespace NadekoBot.Migrations
|
|||||||
|
|
||||||
migrationBuilder.Sql("UPDATE Permission SET NextId = NULL;");
|
migrationBuilder.Sql("UPDATE Permission SET NextId = NULL;");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.Sql("DELETE FROM FilteredWord WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)");
|
||||||
name: "Permission");
|
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.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(
|
migrationBuilder.DropColumn(
|
||||||
name: "ChannelCreated",
|
name: "ChannelCreated",
|
||||||
table: "LogSettings");
|
table: "LogSettings");
|
||||||
@@ -106,6 +80,39 @@ namespace NadekoBot.Migrations
|
|||||||
migrationBuilder.DropColumn(
|
migrationBuilder.DropColumn(
|
||||||
name: "VoicePresenceChannelId",
|
name: "VoicePresenceChannelId",
|
||||||
table: "LogSettings");
|
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(
|
migrationBuilder.DropColumn(
|
||||||
name: "AutoAssignRoleId",
|
name: "AutoAssignRoleId",
|
||||||
|
@@ -19,7 +19,7 @@ namespace NadekoBot.Services
|
|||||||
private readonly IBotCredentials _creds;
|
private readonly IBotCredentials _creds;
|
||||||
private readonly DateTime _started;
|
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 Author => "Kwoth#2452";
|
||||||
public string Library => "Discord.Net";
|
public string Library => "Discord.Net";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user