Index: Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql =================================================================== diff -u -r5eefb1e7166380719c39d6c20504d3cc5625dd13 -r65866d8a02406f9e39791eed599e716628ee4055 --- Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql (.../DatabaseStructure17.2.sql) (revision 5eefb1e7166380719c39d6c20504d3cc5625dd13) +++ Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql (.../DatabaseStructure17.2.sql) (revision 65866d8a02406f9e39791eed599e716628ee4055) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 04-May-2017 1:17:02 PM */ +/* Created On : 05-mei-2017 08:54:53 */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -393,6 +393,7 @@ 'ClosingStructuresFailureMechanismMetaEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismEntityId' INTEGER NOT NULL, 'N2A' INT (4) NOT NULL, + 'ClosingStructureCollectionSourcePath' TEXT, 'ForeshoreProfileCollectionSourcePath' TEXT, CONSTRAINT 'FK_ClosingStructuresFailureMechanismMetaEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade ) @@ -1171,7 +1172,8 @@ 'IdenticalApertures' INT (4) NOT NULL, 'FailureProbabilityReparation' REAL, 'InflowModelType' TINYINT (1) NOT NULL, -- Enum: 1 = VerticalWall, 2 = LowSill, 3 = FloodedCulvert - CONSTRAINT 'FK_ClosingStructureEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade + CONSTRAINT 'FK_ClosingStructureEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade, + CONSTRAINT 'U_Id_FailureMechanismEntityId' UNIQUE ('FailureMechanismEntityId','Id') ) ; Index: Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql =================================================================== diff -u -r755360927a67d206d503b10e0d4c40d5426c4a3b -r65866d8a02406f9e39791eed599e716628ee4055 --- Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql (.../Migration_17.1_17.2.sql) (revision 755360927a67d206d503b10e0d4c40d5426c4a3b) +++ Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql (.../Migration_17.1_17.2.sql) (revision 65866d8a02406f9e39791eed599e716628ee4055) @@ -12,7 +12,76 @@ INSERT INTO BackgroundDataMetaEntity SELECT * FROM [SOURCEPROJECT].BackgroundDataMetaEntity; INSERT INTO CalculationGroupEntity SELECT * FROM [SOURCEPROJECT].CalculationGroupEntity; INSERT INTO CharacteristicPointEntity SELECT * FROM [SOURCEPROJECT].CharacteristicPointEntity; -INSERT INTO ClosingStructureEntity SELECT * FROM [SOURCEPROJECT].ClosingStructureEntity; +INSERT INTO ClosingStructureEntity ( + [ClosingStructureEntityId], + [FailureMechanismEntityId], + [Order], + [Name], + [Id], + [X], + [Y], + [StructureNormalOrientation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [LevelCrestStructureNotClosingMean], + [LevelCrestStructureNotClosingStandardDeviation], + [InsideWaterLevelMean], + [InsideWaterLevelStandardDeviation], + [ThresholdHeightOpenWeirMean], + [ThresholdHeightOpenWeirStandardDeviation], + [AreaFlowAperturesMean], + [AreaFlowAperturesStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [ProbabilityOrFrequencyOpenStructureBeforeFlooding], + [FailureProbabilityOpenStructure], + [IdenticalApertures], + [FailureProbabilityReparation], + [InflowModelType]) +SELECT + [ClosingStructureEntityId], + [FailureMechanismEntityId], + [Order], + [Name], + CASE WHEN Suffix THEN [Id] || '(' || Suffix || ')' ELSE [Id] END as [Id], + [X], + [Y], + [StructureNormalOrientation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [LevelCrestStructureNotClosingMean], + [LevelCrestStructureNotClosingStandardDeviation], + [InsideWaterLevelMean], + [InsideWaterLevelStandardDeviation], + [ThresholdHeightOpenWeirMean], + [ThresholdHeightOpenWeirStandardDeviation], + [AreaFlowAperturesMean], + [AreaFlowAperturesStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [ProbabilityOrFrequencyOpenStructureBeforeFlooding], + [FailureProbabilityOpenStructure], + [IdenticalApertures], + [FailureProbabilityReparation], + [InflowModelType] + FROM (SELECT *, (SELECT count(*) + FROM [SOURCEPROJECT].ClosingStructureEntity + WHERE HS.[ClosingStructureEntityId] > [ClosingStructureEntityId] + AND HS.[Name] IS [Name] + AND HS.[FailuremechanismEntityId] = [FailuremechanismEntityId]) as Suffix + FROM [SOURCEPROJECT].ClosingStructureEntity HS); INSERT INTO ClosingStructuresCalculationEntity SELECT * FROM [SOURCEPROJECT].ClosingStructuresCalculationEntity; INSERT INTO ClosingStructuresFailureMechanismMetaEntity ( [ClosingStructuresFailureMechanismMetaEntityId], Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresFailureMechanismMetaEntity.cs =================================================================== diff -u -r755360927a67d206d503b10e0d4c40d5426c4a3b -r65866d8a02406f9e39791eed599e716628ee4055 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresFailureMechanismMetaEntity.cs (.../ClosingStructuresFailureMechanismMetaEntity.cs) (revision 755360927a67d206d503b10e0d4c40d5426c4a3b) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresFailureMechanismMetaEntity.cs (.../ClosingStructuresFailureMechanismMetaEntity.cs) (revision 65866d8a02406f9e39791eed599e716628ee4055) @@ -35,6 +35,7 @@ public long ClosingStructuresFailureMechanismMetaEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int N2A { get; set; } + public string ClosingStructureCollectionSourcePath { get; set; } public string ForeshoreProfileCollectionSourcePath { get; set; } public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx =================================================================== diff -u -r755360927a67d206d503b10e0d4c40d5426c4a3b -r65866d8a02406f9e39791eed599e716628ee4055 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision 755360927a67d206d503b10e0d4c40d5426c4a3b) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision 65866d8a02406f9e39791eed599e716628ee4055) @@ -4,7 +4,7 @@ - + @@ -152,6 +152,7 @@ + @@ -3292,6 +3293,7 @@ + @@ -5674,6 +5676,7 @@ + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram =================================================================== diff -u -r755360927a67d206d503b10e0d4c40d5426c4a3b -r65866d8a02406f9e39791eed599e716628ee4055 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision 755360927a67d206d503b10e0d4c40d5426c4a3b) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision 65866d8a02406f9e39791eed599e716628ee4055) @@ -5,77 +5,77 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - + + + + + Index: build/DatabaseStructure.sql =================================================================== diff -u -r5eefb1e7166380719c39d6c20504d3cc5625dd13 -r65866d8a02406f9e39791eed599e716628ee4055 --- build/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision 5eefb1e7166380719c39d6c20504d3cc5625dd13) +++ build/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision 65866d8a02406f9e39791eed599e716628ee4055) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 04-May-2017 1:17:02 PM */ +/* Created On : 05-mei-2017 08:54:53 */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -393,6 +393,7 @@ 'ClosingStructuresFailureMechanismMetaEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismEntityId' INTEGER NOT NULL, 'N2A' INT (4) NOT NULL, + 'ClosingStructureCollectionSourcePath' TEXT, 'ForeshoreProfileCollectionSourcePath' TEXT, CONSTRAINT 'FK_ClosingStructuresFailureMechanismMetaEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade ) @@ -1171,7 +1172,8 @@ 'IdenticalApertures' INT (4) NOT NULL, 'FailureProbabilityReparation' REAL, 'InflowModelType' TINYINT (1) NOT NULL, -- Enum: 1 = VerticalWall, 2 = LowSill, 3 = FloodedCulvert - CONSTRAINT 'FK_ClosingStructureEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade + CONSTRAINT 'FK_ClosingStructureEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade, + CONSTRAINT 'U_Id_FailureMechanismEntityId' UNIQUE ('FailureMechanismEntityId','Id') ) ; Index: design/DatabaseDesign.eap =================================================================== diff -u -r5eefb1e7166380719c39d6c20504d3cc5625dd13 -r65866d8a02406f9e39791eed599e716628ee4055 Binary files differ Index: design/OpslagMapping.xlsx =================================================================== diff -u -r755360927a67d206d503b10e0d4c40d5426c4a3b -r65866d8a02406f9e39791eed599e716628ee4055 Binary files differ