Index: Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.2_17.3.sql =================================================================== diff -u -r87fd26e2db22521e3755a9b1a03e644ba5aba2b3 -r7bfe11dfb8999836a99a62c18807e4000459151a --- Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.2_17.3.sql (.../Migration_17.2_17.3.sql) (revision 87fd26e2db22521e3755a9b1a03e644ba5aba2b3) +++ Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.2_17.3.sql (.../Migration_17.2_17.3.sql) (revision 7bfe11dfb8999836a99a62c18807e4000459151a) @@ -54,12 +54,10 @@ INSERT INTO HydraulicLocationOutputEntity SELECT * FROM [SOURCEPROJECT].HydraulicLocationOutputEntity; INSERT INTO IllustrationPointResultEntity SELECT * FROM [SOURCEPROJECT].IllustrationPointResultEntity; INSERT INTO MacroStabilityInwardsCalculationEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsCalculationEntity; -INSERT INTO MacroStabilityInwardsCalculationOutputEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsCalculationOutputEntity; INSERT INTO MacroStabilityInwardsCharacteristicPointEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsCharacteristicPointEntity; INSERT INTO MacroStabilityInwardsFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsFailureMechanismMetaEntity; INSERT INTO MacroStabilityInwardsPreconsolidationStressEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsPreconsolidationStressEntity; INSERT INTO MacroStabilityInwardsSectionResultEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSectionResultEntity; -INSERT INTO MacroStabilityInwardsSemiProbabilisticOutputEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSemiProbabilisticOutputEntity; INSERT INTO MacroStabilityInwardsSoilLayerOneDEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSoilLayerOneDEntity; INSERT INTO MacroStabilityInwardsSoilLayerTwoDEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSoilLayerTwoDEntity; INSERT INTO MacroStabilityInwardsSoilProfileOneDEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSoilProfileOneDEntity; @@ -113,6 +111,12 @@ INSERT INTO WaveImpactAsphaltCoverWaveConditionsCalculationEntity SELECT * FROM [SOURCEPROJECT].WaveImpactAsphaltCoverWaveConditionsCalculationEntity; INSERT INTO WaveImpactAsphaltCoverWaveConditionsOutputEntity SELECT * FROM [SOURCEPROJECT].WaveImpactAsphaltCoverWaveConditionsOutputEntity; +/* +Following outputs are not migrated: +*/ +--MacroStabilityInwardsCalculationOutputEntity +--MacroStabilityInwardsSemiProbabilisticOutputEntity + /* Write migration logging */ @@ -125,7 +129,19 @@ 'ToVersion' VARCHAR(20) NOT NULL, 'LogMessage' TEXT NOT NULL ); + +CREATE TEMP TABLE TempLogOutputDeleted +( + 'NrDeleted' INTEGER NOT NULL +); +INSERT INTO TempLogOutputDeleted +SELECT COUNT() +FROM [SOURCEPROJECT].MacroStabilityInwardsCalculationOutputEntity; +INSERT INTO TempLogOutputDeleted +SELECT COUNT() +FROM [SOURCEPROJECT].MacroStabilityInwardsSemiProbabilisticOutputEntity; + INSERT INTO [LOGDATABASE].MigrationLogEntity ( [FromVersion], [ToVersion], @@ -137,6 +153,17 @@ [ToVersion], [LogMessage]) SELECT "17.2", + "17.3", + "* Alle berekende resultaten van het toetsspoor 'Macrostabiliteit binnenwaarts' zijn verwijderd." + FROM TempLogOutputDeleted + WHERE [NrDeleted] > 0 + LIMIT 1; + +INSERT INTO [LOGDATABASE].MigrationLogEntity ( + [FromVersion], + [ToVersion], + [LogMessage]) +SELECT "17.2", "17.3", "* Geen aanpassingen." WHERE ( Index: Application/Ringtoets/test/Application.Ringtoets.Migration.Core.Test/test-data/FullTestProject172.rtd =================================================================== diff -u -r624d4a4f8f9bcc6a9fbe0ffaa9a227679e974062 -r7bfe11dfb8999836a99a62c18807e4000459151a Binary files differ Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo173IntegrationTest.cs =================================================================== diff -u -rd8e4a22bfd0197db115f65780b026b4365f26f94 -r7bfe11dfb8999836a99a62c18807e4000459151a --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo173IntegrationTest.cs (.../MigrationTo173IntegrationTest.cs) (revision d8e4a22bfd0197db115f65780b026b4365f26f94) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo173IntegrationTest.cs (.../MigrationTo173IntegrationTest.cs) (revision 7bfe11dfb8999836a99a62c18807e4000459151a) @@ -62,6 +62,8 @@ AssertVersions(reader); AssertDatabase(reader); + + AssertMacroStabilityInwardsOutput(reader); } AssertLogDatabase(logFilePath); @@ -211,12 +213,10 @@ "HydraulicLocationOutputEntity", "IllustrationPointResultEntity", "MacroStabilityInwardsCalculationEntity", - "MacroStabilityInwardsCalculationOutputEntity", "MacroStabilityInwardsCharacteristicPointEntity", "MacroStabilityInwardsFailureMechanismMetaEntity", "MacroStabilityInwardsPreconsolidationStressEntity", "MacroStabilityInwardsSectionResultEntity", - "MacroStabilityInwardsSemiProbabilisticOutputEntity", "MacroStabilityInwardsSoilLayerOneDEntity", "MacroStabilityInwardsSoilLayerTwoDEntity", "MacroStabilityInwardsSoilProfileOneDEntity", @@ -292,7 +292,7 @@ new MigrationLogMessage("17.2", newVersion, "Gevolgen van de migratie van versie 17.2 naar versie 17.3:"), messages[i++]); AssertMigrationLogMessageEqual( - new MigrationLogMessage("17.2", newVersion, "* Geen aanpassingen."), + new MigrationLogMessage("17.2", newVersion, "* Alle berekende resultaten van het toetsspoor 'Macrostabiliteit binnenwaarts' zijn verwijderd."), messages[i]); } } @@ -313,6 +313,19 @@ reader.AssertReturnedDataIsValid(validateForeignKeys); } + private static void AssertMacroStabilityInwardsOutput(MigratedDatabaseReader reader) + { + const string validateMacroStabilityInwardsCalculationOutput = + "SELECT COUNT() = 0 " + + "FROM [MacroStabilityInwardsCalculationOutputEntity]"; + reader.AssertReturnedDataIsValid(validateMacroStabilityInwardsCalculationOutput); + + const string validateMacroStabilityInwardsSemiProbabiliticOutput = + "SELECT COUNT() = 0 " + + "FROM [MacroStabilityInwardsSemiProbabilisticOutputEntity]"; + reader.AssertReturnedDataIsValid(validateMacroStabilityInwardsSemiProbabiliticOutput); + } + /// /// Database reader for migrated database. ///