Index: Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.2_17.3.sql =================================================================== diff -u -r1c167e8adf4521008ed654b807a875df32e96244 -r51b655f7a35048f518d6ea502b720574d771bb06 --- Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.2_17.3.sql (.../Migration_17.2_17.3.sql) (revision 1c167e8adf4521008ed654b807a875df32e96244) +++ Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.2_17.3.sql (.../Migration_17.2_17.3.sql) (revision 51b655f7a35048f518d6ea502b720574d771bb06) @@ -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/MigrationTestProject172.rtd =================================================================== diff -u -r31cd5d43de93b27a153b209f06a3e5e828225d43 -r51b655f7a35048f518d6ea502b720574d771bb06 Binary files differ Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo173IntegrationTest.cs =================================================================== diff -u -rb500c5b64d82b2dee1c041f93aad93a4d12eaadb -r51b655f7a35048f518d6ea502b720574d771bb06 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo173IntegrationTest.cs (.../MigrationTo173IntegrationTest.cs) (revision b500c5b64d82b2dee1c041f93aad93a4d12eaadb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo173IntegrationTest.cs (.../MigrationTo173IntegrationTest.cs) (revision 51b655f7a35048f518d6ea502b720574d771bb06) @@ -59,6 +59,8 @@ AssertVersions(reader); AssertDatabase(reader); + + AssertMacroStabilityInwardsOutput(reader); } AssertLogDatabase(logFilePath); @@ -116,12 +118,10 @@ "HydraulicLocationOutputEntity", "IllustrationPointResultEntity", "MacroStabilityInwardsCalculationEntity", - "MacroStabilityInwardsCalculationOutputEntity", "MacroStabilityInwardsCharacteristicPointEntity", "MacroStabilityInwardsFailureMechanismMetaEntity", "MacroStabilityInwardsPreconsolidationStressEntity", "MacroStabilityInwardsSectionResultEntity", - "MacroStabilityInwardsSemiProbabilisticOutputEntity", "MacroStabilityInwardsSoilLayerOneDEntity", "MacroStabilityInwardsSoilLayerTwoDEntity", "MacroStabilityInwardsSoilProfileOneDEntity", @@ -190,7 +190,7 @@ new MigrationLogMessage("17.2", newVersion, "Gevolgen van de migratie van versie 17.2 naar versie 17.3:"), messages[i++]); MigrationLogTestHelper.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]); } } @@ -210,5 +210,18 @@ "PRAGMA foreign_keys;"; 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); + } } } \ No newline at end of file