Skip to content

Commit

Permalink
Merge pull request #1013 from discord-csharp/migration-fix
Browse files Browse the repository at this point in the history
Migration fix
  • Loading branch information
patrickklaeren authored Mar 27, 2024
2 parents 8c1eb4b + 8e368a2 commit 5897127
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Modix.Data/Migrations/20240326234009_RemoveDeletedFeatures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ public partial class RemoveDeletedFeatures : Migration
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
//migrationBuilder.Sql(@"delete from ""ConfigurationActions"" where ""DesignatedChannelMappingId"" in (select ""Id"" from ""DesignatedChannelMappings"" where ""Type"" = 'GiveawayLog')");
//migrationBuilder.Sql(@"delete from ""DesignatedChannelMappings"" where ""Type"" = 'GiveawayLog'");
migrationBuilder.Sql(@"UPDATE ""DesignatedRoleMappings"" SET ""DeleteActionId"" = NULL WHERE ""Type"" IN ('RestrictedMentionability', 'ResctrictedMentionability')");
migrationBuilder.Sql(@"DELETE FROM ""ConfigurationActions"" WHERE ""Id"" IN (392, 393)");

//migrationBuilder.Sql(@"delete from ""ConfigurationActions"" where ""DesignatedRoleMappingId"" in (select ""Id"" from ""DesignatedRoleMappings"" where ""Type"" = 'RestrictedMentionability')");
//migrationBuilder.Sql(@"delete from ""DesignatedRoleMappings"" where ""Type"" = 'RestrictedMentionability'");
migrationBuilder.Sql(@"delete from ""ConfigurationActions"" where ""DesignatedChannelMappingId"" in (select ""Id"" from ""DesignatedChannelMappings"" where ""Type"" = 'GiveawayLog')");
migrationBuilder.Sql(@"delete from ""DesignatedChannelMappings"" where ""Type"" = 'GiveawayLog'");

//migrationBuilder.Sql(@"delete from ""ConfigurationActions"" where ""DesignatedRoleMappingId"" in (select ""Id"" from ""DesignatedRoleMappings"" where ""Type"" = 'ResctrictedMentionability')");
//migrationBuilder.Sql(@"delete from ""DesignatedRoleMappings"" where ""Type"" = 'ResctrictedMentionability'");
migrationBuilder.Sql(@"delete from ""ConfigurationActions"" where ""DesignatedRoleMappingId"" in (select ""Id"" from ""DesignatedRoleMappings"" where ""Type"" = 'RestrictedMentionability')");
migrationBuilder.Sql(@"delete from ""DesignatedRoleMappings"" where ""Type"" = 'RestrictedMentionability'");

migrationBuilder.Sql(@"delete from ""ConfigurationActions"" where ""DesignatedRoleMappingId"" in (select ""Id"" from ""DesignatedRoleMappings"" where ""Type"" = 'ResctrictedMentionability')");
migrationBuilder.Sql(@"delete from ""DesignatedRoleMappings"" where ""Type"" = 'ResctrictedMentionability'");
}

/// <inheritdoc />
Expand Down

0 comments on commit 5897127

Please sign in to comment.