Index: Riskeer/Common/test/Riskeer.Common.Util.Test/ProjectVersionHelperTest.cs
===================================================================
diff -u -ra47a7d17dbc02b075847a5ce1997e19511bbd95c -r852da94031c1de463cdd55865cb788ba7ced0e69
--- Riskeer/Common/test/Riskeer.Common.Util.Test/ProjectVersionHelperTest.cs (.../ProjectVersionHelperTest.cs) (revision a47a7d17dbc02b075847a5ce1997e19511bbd95c)
+++ Riskeer/Common/test/Riskeer.Common.Util.Test/ProjectVersionHelperTest.cs (.../ProjectVersionHelperTest.cs) (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -141,7 +141,6 @@
new TestCaseData("17.3"),
new TestCaseData("18.1"),
new TestCaseData("19.1"),
- new TestCaseData("19.2")
};
}
Fisheye: Tag 852da94031c1de463cdd55865cb788ba7ced0e69 refers to a dead (removed) revision in file `Riskeer/Migration/src/Riskeer.Migration.Core/EmbeddedResources/DatabaseStructure19.2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 852da94031c1de463cdd55865cb788ba7ced0e69 refers to a dead (removed) revision in file `Riskeer/Migration/src/Riskeer.Migration.Core/EmbeddedResources/Migration_19.1_19.2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/Migration/src/Riskeer.Migration.Core/EmbeddedResources/Migration_19.1_20.1.sql
===================================================================
diff -u
--- Riskeer/Migration/src/Riskeer.Migration.Core/EmbeddedResources/Migration_19.1_20.1.sql (revision 0)
+++ Riskeer/Migration/src/Riskeer.Migration.Core/EmbeddedResources/Migration_19.1_20.1.sql (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -0,0 +1,155 @@
+/*
+Migration script for migrating Ringtoets databases.
+SourceProject version: 19.1
+TargetProject version: 20.1
+*/
+
+PRAGMA foreign_keys = OFF;
+
+ATTACH DATABASE "{0}" AS SOURCEPROJECT;
+
+INSERT INTO AssessmentSectionEntity SELECT * FROM [SOURCEPROJECT].AssessmentSectionEntity;
+INSERT INTO BackgroundDataEntity SELECT * FROM [SOURCEPROJECT].BackgroundDataEntity;
+INSERT INTO BackgroundDataMetaEntity SELECT * FROM [SOURCEPROJECT].BackgroundDataMetaEntity;
+INSERT INTO CalculationGroupEntity SELECT * FROM [SOURCEPROJECT].CalculationGroupEntity;
+INSERT INTO ClosingStructureEntity SELECT * FROM [SOURCEPROJECT].ClosingStructureEntity;
+INSERT INTO ClosingStructuresCalculationEntity SELECT * FROM [SOURCEPROJECT].ClosingStructuresCalculationEntity;
+INSERT INTO ClosingStructuresFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].ClosingStructuresFailureMechanismMetaEntity;
+INSERT INTO ClosingStructuresOutputEntity SELECT * FROM [SOURCEPROJECT].ClosingStructuresOutputEntity;
+INSERT INTO ClosingStructuresSectionResultEntity SELECT * FROM [SOURCEPROJECT].ClosingStructuresSectionResultEntity;
+INSERT INTO DikeProfileEntity SELECT * FROM [SOURCEPROJECT].DikeProfileEntity;
+INSERT INTO DuneErosionFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].DuneErosionFailureMechanismMetaEntity;
+INSERT INTO DuneErosionSectionResultEntity SELECT * FROM [SOURCEPROJECT].DuneErosionSectionResultEntity;
+INSERT INTO DuneLocationCalculationCollectionEntity SELECT * FROM [SOURCEPROJECT].DuneLocationCalculationCollectionEntity;
+INSERT INTO DuneLocationCalculationEntity SELECT * FROM [SOURCEPROJECT].DuneLocationCalculationEntity;
+INSERT INTO DuneLocationCalculationOutputEntity SELECT * FROM [SOURCEPROJECT].DuneLocationCalculationOutputEntity;
+INSERT INTO DuneLocationEntity SELECT * FROM [SOURCEPROJECT].DuneLocationEntity;
+INSERT INTO FailureMechanismEntity SELECT * FROM [SOURCEPROJECT].FailureMechanismEntity;
+INSERT INTO FailureMechanismSectionEntity SELECT * FROM [SOURCEPROJECT].FailureMechanismSectionEntity;
+INSERT INTO FaultTreeIllustrationPointEntity SELECT * FROM [SOURCEPROJECT].FaultTreeIllustrationPointEntity;
+INSERT INTO FaultTreeIllustrationPointStochastEntity SELECT * FROM [SOURCEPROJECT].FaultTreeIllustrationPointStochastEntity;
+INSERT INTO FaultTreeSubmechanismIllustrationPointEntity SELECT * FROM [SOURCEPROJECT].FaultTreeSubmechanismIllustrationPointEntity;
+INSERT INTO ForeshoreProfileEntity SELECT * FROM [SOURCEPROJECT].ForeshoreProfileEntity;
+INSERT INTO GeneralResultFaultTreeIllustrationPointEntity SELECT * FROM [SOURCEPROJECT].GeneralResultFaultTreeIllustrationPointEntity;
+INSERT INTO GeneralResultFaultTreeIllustrationPointStochastEntity SELECT * FROM [SOURCEPROJECT].GeneralResultFaultTreeIllustrationPointStochastEntity;
+INSERT INTO GeneralResultSubMechanismIllustrationPointEntity SELECT * FROM [SOURCEPROJECT].GeneralResultSubMechanismIllustrationPointEntity;
+INSERT INTO GeneralResultSubMechanismIllustrationPointStochastEntity SELECT * FROM [SOURCEPROJECT].GeneralResultSubMechanismIllustrationPointStochastEntity;
+INSERT INTO GrassCoverErosionInwardsCalculationEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionInwardsCalculationEntity;
+INSERT INTO GrassCoverErosionInwardsDikeHeightOutputEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionInwardsDikeHeightOutputEntity;
+INSERT INTO GrassCoverErosionInwardsFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionInwardsFailureMechanismMetaEntity;
+INSERT INTO GrassCoverErosionInwardsOutputEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionInwardsOutputEntity;
+INSERT INTO GrassCoverErosionInwardsOvertoppingRateOutputEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionInwardsOvertoppingRateOutputEntity;
+INSERT INTO GrassCoverErosionInwardsSectionResultEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionInwardsSectionResultEntity;
+INSERT INTO GrassCoverErosionOutwardsFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionOutwardsFailureMechanismMetaEntity;
+INSERT INTO GrassCoverErosionOutwardsSectionResultEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionOutwardsSectionResultEntity;
+INSERT INTO GrassCoverErosionOutwardsWaveConditionsCalculationEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionOutwardsWaveConditionsCalculationEntity;
+INSERT INTO GrassCoverErosionOutwardsWaveConditionsOutputEntity SELECT * FROM [SOURCEPROJECT].GrassCoverErosionOutwardsWaveConditionsOutputEntity;
+INSERT INTO GrassCoverSlipOffInwardsSectionResultEntity SELECT * FROM [SOURCEPROJECT].GrassCoverSlipOffInwardsSectionResultEntity;
+INSERT INTO GrassCoverSlipOffOutwardsSectionResultEntity SELECT * FROM [SOURCEPROJECT].GrassCoverSlipOffOutwardsSectionResultEntity;
+INSERT INTO HeightStructureEntity SELECT * FROM [SOURCEPROJECT].HeightStructureEntity;
+INSERT INTO HeightStructuresCalculationEntity SELECT * FROM [SOURCEPROJECT].HeightStructuresCalculationEntity;
+INSERT INTO HeightStructuresFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].HeightStructuresFailureMechanismMetaEntity;
+INSERT INTO HeightStructuresOutputEntity SELECT * FROM [SOURCEPROJECT].HeightStructuresOutputEntity;
+INSERT INTO HeightStructuresSectionResultEntity SELECT * FROM [SOURCEPROJECT].HeightStructuresSectionResultEntity;
+INSERT INTO HydraulicBoundaryDatabaseEntity SELECT * FROM [SOURCEPROJECT].HydraulicBoundaryDatabaseEntity;
+INSERT INTO HydraulicLocationCalculationCollectionEntity SELECT * FROM [SOURCEPROJECT].HydraulicLocationCalculationCollectionEntity;
+INSERT INTO HydraulicLocationCalculationEntity SELECT * FROM [SOURCEPROJECT].HydraulicLocationCalculationEntity;
+INSERT INTO HydraulicLocationEntity SELECT * FROM [SOURCEPROJECT].HydraulicLocationEntity;
+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 MacroStabilityInwardsSoilLayerOneDEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSoilLayerOneDEntity;
+INSERT INTO MacroStabilityInwardsSoilLayerTwoDEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSoilLayerTwoDEntity;
+INSERT INTO MacroStabilityInwardsSoilProfileOneDEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSoilProfileOneDEntity;
+INSERT INTO MacroStabilityInwardsSoilProfileTwoDEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSoilProfileTwoDEntity;
+INSERT INTO MacroStabilityInwardsSoilProfileTwoDSoilLayerTwoDEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsSoilProfileTwoDSoilLayerTwoDEntity;
+INSERT INTO MacroStabilityInwardsStochasticSoilProfileEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityInwardsStochasticSoilProfileEntity;
+INSERT INTO MacroStabilityOutwardsFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityOutwardsFailureMechanismMetaEntity;
+INSERT INTO MacroStabilityOutwardsSectionResultEntity SELECT * FROM [SOURCEPROJECT].MacroStabilityOutwardsSectionResultEntity;
+INSERT INTO MicrostabilitySectionResultEntity SELECT * FROM [SOURCEPROJECT].MicrostabilitySectionResultEntity;
+INSERT INTO PipingCalculationEntity SELECT * FROM [SOURCEPROJECT].PipingCalculationEntity;
+INSERT INTO PipingCalculationOutputEntity SELECT * FROM [SOURCEPROJECT].PipingCalculationOutputEntity;
+INSERT INTO PipingCharacteristicPointEntity SELECT * FROM [SOURCEPROJECT].PipingCharacteristicPointEntity;
+INSERT INTO PipingFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].PipingFailureMechanismMetaEntity;
+INSERT INTO PipingSectionResultEntity SELECT * FROM [SOURCEPROJECT].PipingSectionResultEntity;
+INSERT INTO PipingSoilLayerEntity SELECT * FROM [SOURCEPROJECT].PipingSoilLayerEntity;
+INSERT INTO PipingSoilProfileEntity SELECT * FROM [SOURCEPROJECT].PipingSoilProfileEntity;
+INSERT INTO PipingStochasticSoilProfileEntity SELECT * FROM [SOURCEPROJECT].PipingStochasticSoilProfileEntity;
+INSERT INTO PipingStructureFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].PipingStructureFailureMechanismMetaEntity;
+INSERT INTO PipingStructureSectionResultEntity SELECT * FROM [SOURCEPROJECT].PipingStructureSectionResultEntity;
+INSERT INTO ProjectEntity SELECT * FROM [SOURCEPROJECT].ProjectEntity;
+INSERT INTO StabilityPointStructureEntity SELECT * FROM [SOURCEPROJECT].StabilityPointStructureEntity;
+INSERT INTO StabilityPointStructuresCalculationEntity SELECT * FROM [SOURCEPROJECT].StabilityPointStructuresCalculationEntity;
+INSERT INTO StabilityPointStructuresFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].StabilityPointStructuresFailureMechanismMetaEntity;
+INSERT INTO StabilityPointStructuresOutputEntity SELECT * FROM [SOURCEPROJECT].StabilityPointStructuresOutputEntity;
+INSERT INTO StabilityPointStructuresSectionResultEntity SELECT * FROM [SOURCEPROJECT].StabilityPointStructuresSectionResultEntity;
+INSERT INTO StabilityStoneCoverFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].StabilityStoneCoverFailureMechanismMetaEntity;
+INSERT INTO StabilityStoneCoverSectionResultEntity SELECT * FROM [SOURCEPROJECT].StabilityStoneCoverSectionResultEntity;
+INSERT INTO StabilityStoneCoverWaveConditionsCalculationEntity SELECT * FROM [SOURCEPROJECT].StabilityStoneCoverWaveConditionsCalculationEntity;
+INSERT INTO StabilityStoneCoverWaveConditionsOutputEntity SELECT * FROM [SOURCEPROJECT].StabilityStoneCoverWaveConditionsOutputEntity;
+INSERT INTO StochastEntity SELECT * FROM [SOURCEPROJECT].StochastEntity;
+INSERT INTO StochasticSoilModelEntity SELECT * FROM [SOURCEPROJECT].StochasticSoilModelEntity;
+INSERT INTO StrengthStabilityLengthwiseConstructionSectionResultEntity SELECT * FROM [SOURCEPROJECT].StrengthStabilityLengthwiseConstructionSectionResultEntity;
+INSERT INTO SubMechanismIllustrationPointEntity SELECT * FROM [SOURCEPROJECT].SubMechanismIllustrationPointEntity;
+INSERT INTO SubMechanismIllustrationPointStochastEntity SELECT * FROM [SOURCEPROJECT].SubMechanismIllustrationPointStochastEntity;
+INSERT INTO SurfaceLineEntity SELECT * FROM [SOURCEPROJECT].SurfaceLineEntity;
+INSERT INTO TechnicalInnovationSectionResultEntity SELECT * FROM [SOURCEPROJECT].TechnicalInnovationSectionResultEntity;
+INSERT INTO TopLevelFaultTreeIllustrationPointEntity SELECT * FROM [SOURCEPROJECT].TopLevelFaultTreeIllustrationPointEntity;
+INSERT INTO TopLevelSubMechanismIllustrationPointEntity SELECT * FROM [SOURCEPROJECT].TopLevelSubMechanismIllustrationPointEntity;
+INSERT INTO VersionEntity (
+ [VersionId],
+ [Version],
+ [Timestamp],
+ [FingerPrint])
+SELECT [VersionId],
+ "20.1",
+ [Timestamp],
+ [FingerPrint]
+FROM [SOURCEPROJECT].VersionEntity;
+INSERT INTO WaterPressureAsphaltCoverSectionResultEntity SELECT * FROM [SOURCEPROJECT].WaterPressureAsphaltCoverSectionResultEntity;
+INSERT INTO WaveImpactAsphaltCoverFailureMechanismMetaEntity SELECT * FROM [SOURCEPROJECT].WaveImpactAsphaltCoverFailureMechanismMetaEntity;
+INSERT INTO WaveImpactAsphaltCoverSectionResultEntity SELECT * FROM [SOURCEPROJECT].WaveImpactAsphaltCoverSectionResultEntity;
+INSERT INTO WaveImpactAsphaltCoverWaveConditionsCalculationEntity SELECT * FROM [SOURCEPROJECT].WaveImpactAsphaltCoverWaveConditionsCalculationEntity;
+INSERT INTO WaveImpactAsphaltCoverWaveConditionsOutputEntity SELECT * FROM [SOURCEPROJECT].WaveImpactAsphaltCoverWaveConditionsOutputEntity;
+
+/*
+Write migration logging
+*/
+ATTACH DATABASE "{1}" AS LOGDATABASE;
+
+CREATE TABLE IF NOT EXISTS [LOGDATABASE].'MigrationLogEntity'
+(
+ 'MigrationLogEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+ 'FromVersion' VARCHAR(20) NOT NULL,
+ 'ToVersion' VARCHAR(20) NOT NULL,
+ 'LogMessage' TEXT NOT NULL
+);
+
+INSERT INTO [LOGDATABASE].MigrationLogEntity (
+ [FromVersion],
+ [ToVersion],
+ [LogMessage])
+VALUES ("19.1", "20.1", "Gevolgen van de migratie van versie 19.1 naar versie 20.1:");
+
+INSERT INTO [LOGDATABASE].MigrationLogEntity (
+ [FromVersion],
+ [ToVersion],
+ [LogMessage])
+SELECT "19.1",
+ "20.1",
+ "* Geen aanpassingen."
+ WHERE (
+ SELECT COUNT() FROM [LOGDATABASE].MigrationLogEntity
+ WHERE [FromVersion] = "19.1"
+ ) IS 1;
+
+DETACH LOGDATABASE;
+
+DETACH SOURCEPROJECT;
+
+PRAGMA foreign_keys = ON;
\ No newline at end of file
Fisheye: Tag 852da94031c1de463cdd55865cb788ba7ced0e69 refers to a dead (removed) revision in file `Riskeer/Migration/src/Riskeer.Migration.Core/EmbeddedResources/Migration_19.2_20.1.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/Migration/src/Riskeer.Migration.Core/Riskeer.Migration.Core.csproj
===================================================================
diff -u -r500c0893cf3b60a1e9d4f4d32093bfd0a2b78daa -r852da94031c1de463cdd55865cb788ba7ced0e69
--- Riskeer/Migration/src/Riskeer.Migration.Core/Riskeer.Migration.Core.csproj (.../Riskeer.Migration.Core.csproj) (revision 500c0893cf3b60a1e9d4f4d32093bfd0a2b78daa)
+++ Riskeer/Migration/src/Riskeer.Migration.Core/Riskeer.Migration.Core.csproj (.../Riskeer.Migration.Core.csproj) (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -109,15 +109,11 @@
-
-
+
-
-
-
Index: Riskeer/Migration/test/Riskeer.Migration.Core.Test/test-data/MigrationTestProject192.risk
===================================================================
diff -u -r09a6345c35c5c851dfb153e73abd69aaf64c0ebd -r852da94031c1de463cdd55865cb788ba7ced0e69
Binary files differ
Index: Riskeer/Migration/test/Riskeer.Migration.Core.TestUtil.Test/ProjectMigrationTestHelperTest.cs
===================================================================
diff -u -ra47a7d17dbc02b075847a5ce1997e19511bbd95c -r852da94031c1de463cdd55865cb788ba7ced0e69
--- Riskeer/Migration/test/Riskeer.Migration.Core.TestUtil.Test/ProjectMigrationTestHelperTest.cs (.../ProjectMigrationTestHelperTest.cs) (revision a47a7d17dbc02b075847a5ce1997e19511bbd95c)
+++ Riskeer/Migration/test/Riskeer.Migration.Core.TestUtil.Test/ProjectMigrationTestHelperTest.cs (.../ProjectMigrationTestHelperTest.cs) (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -97,8 +97,7 @@
"17.2",
"17.3",
"18.1",
- "19.1",
- "19.2"
+ "19.1"
};
CollectionAssert.AreEqual(expectedProjectVersions, returnedProjectVersions);
}
Index: Riskeer/Migration/test/Riskeer.Migration.Core.TestUtil/ProjectMigrationTestHelper.cs
===================================================================
diff -u -ra47a7d17dbc02b075847a5ce1997e19511bbd95c -r852da94031c1de463cdd55865cb788ba7ced0e69
--- Riskeer/Migration/test/Riskeer.Migration.Core.TestUtil/ProjectMigrationTestHelper.cs (.../ProjectMigrationTestHelper.cs) (revision a47a7d17dbc02b075847a5ce1997e19511bbd95c)
+++ Riskeer/Migration/test/Riskeer.Migration.Core.TestUtil/ProjectMigrationTestHelper.cs (.../ProjectMigrationTestHelper.cs) (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -73,7 +73,6 @@
yield return "MigrationTestProject173.rtd";
yield return "MigrationTestProject181.rtd";
yield return "MigrationTestProject191.risk";
- yield return "MigrationTestProject192.risk";
}
///
Index: Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationIntegrationTest.cs
===================================================================
diff -u -ra47a7d17dbc02b075847a5ce1997e19511bbd95c -r852da94031c1de463cdd55865cb788ba7ced0e69
--- Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationIntegrationTest.cs (.../MigrationIntegrationTest.cs) (revision a47a7d17dbc02b075847a5ce1997e19511bbd95c)
+++ Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationIntegrationTest.cs (.../MigrationIntegrationTest.cs) (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -102,7 +102,7 @@
using (var reader = new MigrationLogDatabaseReader(logFilePath))
{
ReadOnlyCollection messages = reader.GetMigrationLogMessages();
- Assert.AreEqual(14, messages.Count);
+ Assert.AreEqual(12, messages.Count);
MigrationLogTestHelper.AssertMigrationLogMessageEqual(
new MigrationLogMessage("5", "17.1", "Gevolgen van de migratie van versie 16.4 naar versie 17.1:"),
messages[0]);
@@ -134,17 +134,11 @@
new MigrationLogMessage("18.1", "19.1", "* Geen aanpassingen."),
messages[9]);
MigrationLogTestHelper.AssertMigrationLogMessageEqual(
- new MigrationLogMessage("19.1", "19.2", "Gevolgen van de migratie van versie 19.1 naar versie 19.2:"),
+ new MigrationLogMessage("19.1", "20.1", $"Gevolgen van de migratie van versie 19.1 naar versie {latestVersion}:"),
messages[10]);
MigrationLogTestHelper.AssertMigrationLogMessageEqual(
- new MigrationLogMessage("19.1", "19.2", "* Geen aanpassingen."),
+ new MigrationLogMessage("19.1", "20.1", "* Geen aanpassingen."),
messages[11]);
- MigrationLogTestHelper.AssertMigrationLogMessageEqual(
- new MigrationLogMessage("19.2", latestVersion, $"Gevolgen van de migratie van versie 19.2 naar versie {latestVersion}:"),
- messages[12]);
- MigrationLogTestHelper.AssertMigrationLogMessageEqual(
- new MigrationLogMessage("19.2", latestVersion, "* Geen aanpassingen."),
- messages[13]);
}
}
}
Fisheye: Tag 852da94031c1de463cdd55865cb788ba7ced0e69 refers to a dead (removed) revision in file `Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo192IntegrationTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo201IntegrationTest.cs
===================================================================
diff -u
--- Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo201IntegrationTest.cs (revision 0)
+++ Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo201IntegrationTest.cs (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -0,0 +1,217 @@
+// Copyright (C) Stichting Deltares 2019. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Collections.ObjectModel;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Riskeer.Migration.Core;
+using Riskeer.Migration.Core.TestUtil;
+
+namespace Riskeer.Migration.Integration.Test
+{
+ [TestFixture]
+ public class MigrationTo201IntegrationTest
+ {
+ private const string newVersion = "20.1";
+
+ [Test]
+ public void Given181Project_WhenUpgradedTo191_ThenProjectAsExpected()
+ {
+ // Given
+ string sourceFilePath = TestHelper.GetTestDataPath(TestDataPath.Riskeer.Migration.Core,
+ "MigrationTestProject191.risk");
+ var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
+
+ string targetFilePath = TestHelper.GetScratchPadPath(nameof(Given181Project_WhenUpgradedTo191_ThenProjectAsExpected));
+ string logFilePath = TestHelper.GetScratchPadPath(string.Concat(nameof(Given181Project_WhenUpgradedTo191_ThenProjectAsExpected), ".log"));
+ var migrator = new ProjectFileMigrator
+ {
+ LogPath = logFilePath
+ };
+
+ using (new FileDisposeHelper(logFilePath))
+ using (new FileDisposeHelper(targetFilePath))
+ {
+ // When
+ migrator.Migrate(fromVersionedFile, newVersion, targetFilePath);
+
+ // Then
+ using (var reader = new MigratedDatabaseReader(targetFilePath))
+ {
+ AssertTablesContentMigrated(reader, sourceFilePath);
+
+ AssertVersions(reader);
+ AssertDatabase(reader);
+ }
+
+ AssertLogDatabase(logFilePath);
+ }
+ }
+
+ private static void AssertTablesContentMigrated(MigratedDatabaseReader reader, string sourceFilePath)
+ {
+ string[] tables =
+ {
+ "AssessmentSectionEntity",
+ "BackgroundDataEntity",
+ "BackgroundDataMetaEntity",
+ "CalculationGroupEntity",
+ "ClosingStructureEntity",
+ "ClosingStructuresCalculationEntity",
+ "ClosingStructuresFailureMechanismMetaEntity",
+ "ClosingStructuresOutputEntity",
+ "ClosingStructuresSectionResultEntity",
+ "DikeProfileEntity",
+ "DuneErosionFailureMechanismMetaEntity",
+ "DuneErosionSectionResultEntity",
+ "DuneLocationCalculationCollectionEntity",
+ "DuneLocationCalculationEntity",
+ "DuneLocationCalculationOutputEntity",
+ "DuneLocationEntity",
+ "FailureMechanismEntity",
+ "FailureMechanismSectionEntity",
+ "FaultTreeIllustrationPointEntity",
+ "FaultTreeIllustrationPointStochastEntity",
+ "FaultTreeSubmechanismIllustrationPointEntity",
+ "ForeshoreProfileEntity",
+ "GeneralResultFaultTreeIllustrationPointEntity",
+ "GeneralResultFaultTreeIllustrationPointStochastEntity",
+ "GeneralResultSubMechanismIllustrationPointEntity",
+ "GeneralResultSubMechanismIllustrationPointStochastEntity",
+ "GrassCoverErosionInwardsCalculationEntity",
+ "GrassCoverErosionInwardsDikeHeightOutputEntity",
+ "GrassCoverErosionInwardsFailureMechanismMetaEntity",
+ "GrassCoverErosionInwardsOutputEntity",
+ "GrassCoverErosionInwardsOvertoppingRateOutputEntity",
+ "GrassCoverErosionInwardsSectionResultEntity",
+ "GrassCoverErosionOutwardsFailureMechanismMetaEntity",
+ "GrassCoverErosionOutwardsSectionResultEntity",
+ "GrassCoverErosionOutwardsWaveConditionsCalculationEntity",
+ "GrassCoverErosionOutwardsWaveConditionsOutputEntity",
+ "GrassCoverSlipOffInwardsSectionResultEntity",
+ "GrassCoverSlipOffOutwardsSectionResultEntity",
+ "HeightStructureEntity",
+ "HeightStructuresCalculationEntity",
+ "HeightStructuresFailureMechanismMetaEntity",
+ "HeightStructuresOutputEntity",
+ "HeightStructuresSectionResultEntity",
+ "HydraulicBoundaryDatabaseEntity",
+ "HydraulicLocationCalculationCollectionEntity",
+ "HydraulicLocationCalculationEntity",
+ "HydraulicLocationEntity",
+ "HydraulicLocationOutputEntity",
+ "IllustrationPointResultEntity",
+ "MacroStabilityInwardsCalculationEntity",
+ "MacroStabilityInwardsCalculationOutputEntity",
+ "MacroStabilityInwardsCharacteristicPointEntity",
+ "MacroStabilityInwardsFailureMechanismMetaEntity",
+ "MacroStabilityInwardsPreconsolidationStressEntity",
+ "MacroStabilityInwardsSectionResultEntity",
+ "MacroStabilityInwardsSoilLayerOneDEntity",
+ "MacroStabilityInwardsSoilLayerTwoDEntity",
+ "MacroStabilityInwardsSoilProfileOneDEntity",
+ "MacroStabilityInwardsSoilProfileTwoDEntity",
+ "MacroStabilityInwardsSoilProfileTwoDSoilLayerTwoDEntity",
+ "MacroStabilityInwardsStochasticSoilProfileEntity",
+ "MacroStabilityOutwardsFailureMechanismMetaEntity",
+ "MacroStabilityOutwardsSectionResultEntity",
+ "MicrostabilitySectionResultEntity",
+ "PipingCalculationEntity",
+ "PipingCalculationOutputEntity",
+ "PipingCharacteristicPointEntity",
+ "PipingFailureMechanismMetaEntity",
+ "PipingSectionResultEntity",
+ "PipingSoilLayerEntity",
+ "PipingSoilProfileEntity",
+ "PipingStochasticSoilProfileEntity",
+ "PipingStructureFailureMechanismMetaEntity",
+ "PipingStructureSectionResultEntity",
+ "ProjectEntity",
+ "StabilityPointStructureEntity",
+ "StabilityPointStructuresCalculationEntity",
+ "StabilityPointStructuresFailureMechanismMetaEntity",
+ "StabilityPointStructuresOutputEntity",
+ "StabilityPointStructuresSectionResultEntity",
+ "StabilityStoneCoverFailureMechanismMetaEntity",
+ "StabilityStoneCoverSectionResultEntity",
+ "StabilityStoneCoverWaveConditionsCalculationEntity",
+ "StabilityStoneCoverWaveConditionsOutputEntity",
+ "StochastEntity",
+ "StochasticSoilModelEntity",
+ "StrengthStabilityLengthwiseConstructionSectionResultEntity",
+ "SubMechanismIllustrationPointEntity",
+ "SubMechanismIllustrationPointStochastEntity",
+ "SurfaceLineEntity",
+ "TechnicalInnovationSectionResultEntity",
+ "TopLevelFaultTreeIllustrationPointEntity",
+ "TopLevelSubMechanismIllustrationPointEntity",
+ "VersionEntity",
+ "WaterPressureAsphaltCoverSectionResultEntity",
+ "WaveImpactAsphaltCoverFailureMechanismMetaEntity",
+ "WaveImpactAsphaltCoverSectionResultEntity",
+ "WaveImpactAsphaltCoverWaveConditionsCalculationEntity",
+ "WaveImpactAsphaltCoverWaveConditionsOutputEntity"
+ };
+
+ foreach (string table in tables)
+ {
+ string validateMigratedTable =
+ $"ATTACH DATABASE \"{sourceFilePath}\" AS SOURCEPROJECT; " +
+ $"SELECT COUNT() = (SELECT COUNT() FROM [SOURCEPROJECT].{table}) " +
+ $"FROM {table};" +
+ "DETACH SOURCEPROJECT;";
+ reader.AssertReturnedDataIsValid(validateMigratedTable);
+ }
+ }
+
+ private static void AssertVersions(MigratedDatabaseReader reader)
+ {
+ const string validateVersion =
+ "SELECT COUNT() = 1 " +
+ "FROM [VersionEntity] " +
+ "WHERE [Version] = \"20.1\";";
+ reader.AssertReturnedDataIsValid(validateVersion);
+ }
+ private static void AssertDatabase(MigratedDatabaseReader reader)
+ {
+ const string validateForeignKeys =
+ "PRAGMA foreign_keys;";
+ reader.AssertReturnedDataIsValid(validateForeignKeys);
+ }
+
+ private static void AssertLogDatabase(string logFilePath)
+ {
+ using (var reader = new MigrationLogDatabaseReader(logFilePath))
+ {
+ ReadOnlyCollection messages = reader.GetMigrationLogMessages();
+
+ Assert.AreEqual(2, messages.Count);
+ var i = 0;
+ MigrationLogTestHelper.AssertMigrationLogMessageEqual(
+ new MigrationLogMessage("19.1", newVersion, "Gevolgen van de migratie van versie 19.1 naar versie 20.1:"),
+ messages[i++]);
+ MigrationLogTestHelper.AssertMigrationLogMessageEqual(
+ new MigrationLogMessage("19.1", newVersion, "* Geen aanpassingen."),
+ messages[i]);
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Riskeer/Migration/test/Riskeer.Migration.Integration.Test/Riskeer.Migration.Integration.Test.csproj
===================================================================
diff -u -r20b228bc1658eb5bc892c76dd4ec0d871c6499fb -r852da94031c1de463cdd55865cb788ba7ced0e69
--- Riskeer/Migration/test/Riskeer.Migration.Integration.Test/Riskeer.Migration.Integration.Test.csproj (.../Riskeer.Migration.Integration.Test.csproj) (revision 20b228bc1658eb5bc892c76dd4ec0d871c6499fb)
+++ Riskeer/Migration/test/Riskeer.Migration.Integration.Test/Riskeer.Migration.Integration.Test.csproj (.../Riskeer.Migration.Integration.Test.csproj) (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -23,7 +23,7 @@
-
+
Index: Riskeer/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs
===================================================================
diff -u -ra47a7d17dbc02b075847a5ce1997e19511bbd95c -r852da94031c1de463cdd55865cb788ba7ced0e69
--- Riskeer/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs (.../ProjectMigratorTest.cs) (revision a47a7d17dbc02b075847a5ce1997e19511bbd95c)
+++ Riskeer/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs (.../ProjectMigratorTest.cs) (revision 852da94031c1de463cdd55865cb788ba7ced0e69)
@@ -524,10 +524,8 @@
migrationLog.AppendLine("* Traject: 'Demo traject'");
migrationLog.AppendLine(" + Er worden standaardwaarden conform WBI2017 gebruikt voor de HLCD bestandsinformatie.");
migrationLog.AppendLine(" + De waarde voor de transparantie van de achtergrondkaart is aangepast naar 0.60.");
- migrationLog.AppendLine("Gevolgen van de migratie van versie 19.1 naar versie 19.2:");
+ migrationLog.AppendLine("Gevolgen van de migratie van versie 19.1 naar versie 20.1:");
migrationLog.AppendLine("* Geen aanpassingen.");
- migrationLog.AppendLine("Gevolgen van de migratie van versie 19.2 naar versie 20.1:");
- migrationLog.AppendLine("* Geen aanpassingen.");
Tuple[] expectedLogMessagesAndLevel =
{