diff --git a/src/ParcelRegistry.Projections.Legacy/Migrations/20240607120641_DeleteOldRenameV2WithCount.cs b/src/ParcelRegistry.Projections.Legacy/Migrations/20240607120641_DeleteOldRenameV2WithCount.cs index b5dccaaf..e8b5b7f6 100644 --- a/src/ParcelRegistry.Projections.Legacy/Migrations/20240607120641_DeleteOldRenameV2WithCount.cs +++ b/src/ParcelRegistry.Projections.Legacy/Migrations/20240607120641_DeleteOldRenameV2WithCount.cs @@ -120,7 +120,7 @@ FROM [{Infrastructure.Schema.Legacy}].[{ParcelDetailConfiguration.TableName}] migrationBuilder.Sql($@"CREATE UNIQUE CLUSTERED INDEX IX_{LegacyContext.ParcelDetailListCountName} ON [{Infrastructure.Schema.Legacy}].[{LegacyContext.ParcelDetailListCountName}] (Count)"); - migrationBuilder.Sql($"DELETE FROM [{Infrastructure.Schema.Legacy}].[ProjectionStates] WHERE [Name] = 'ParcelRegistry.Projections.Legacy.ParcelDetailV2.ParcelDetailV2Projections'"); + migrationBuilder.Sql($"DELETE FROM [{Infrastructure.Schema.Legacy}].[ProjectionStates] WHERE [Name] in ('ParcelRegistry.Projections.Legacy.ParcelDetailV2.ParcelDetailV2Projections', 'ParcelRegistry.Projections.Legacy.ParcelDetail.ParcelDetailProjections')"); migrationBuilder.Sql($"UPDATE [{Infrastructure.Schema.Legacy}].[ProjectionStates] SET [Name] = 'ParcelRegistry.Projections.Legacy.ParcelDetail.ParcelDetailProjections' WHERE [Name] = 'ParcelRegistry.Projections.Legacy.ParcelDetailWithCountV2.ParcelDetailV2Projections'"); }