Index: Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql =================================================================== diff -u -re6a591b93ec33becef19b4d71f3d49de0fbd7f10 -rb5e832a216ef821659319f136efdd7fb6dd07ebd --- Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql (.../DatabaseStructure17.2.sql) (revision e6a591b93ec33becef19b4d71f3d49de0fbd7f10) +++ Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql (.../DatabaseStructure17.2.sql) (revision b5e832a216ef821659319f136efdd7fb6dd07ebd) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 13-Jul-2017 2:06:57 PM */ +/* Created On : 13-Jul-2017 3:10:18 PM */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -373,6 +373,7 @@ 'FactorStormDurationOpenStructure' REAL, 'DrainCoefficientMean' REAL, 'FailureProbabilityStructureWithErosion' REAL NOT NULL, + 'ShouldIllustrationPointsBeCalculated' TINYINT (1) NOT NULL, CONSTRAINT 'FK_StabilityPointStructuresCalculationEntity_CalculationGroupEntity' FOREIGN KEY ('CalculationGroupEntityId') REFERENCES 'CalculationGroupEntity' ('CalculationGroupEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_StabilityPointStructuresCalculationEntity_ForeshoreProfileEntity' FOREIGN KEY ('ForeshoreProfileEntityId') REFERENCES 'ForeshoreProfileEntity' ('ForeshoreProfileEntityId') ON DELETE Set Null ON UPDATE Cascade, CONSTRAINT 'FK_StabilityPointStructuresCalculationEntity_HydraulicLocationEntity' FOREIGN KEY ('HydraulicLocationEntityId') REFERENCES 'HydraulicLocationEntity' ('HydraulicLocationEntityId') ON DELETE Set Null ON UPDATE Cascade, @@ -1177,6 +1178,7 @@ 'UseForeshore' TINYINT (1) NOT NULL, -- true or false 'BreakWaterType' TINYINT (1) NOT NULL, -- Enum: 1 = Wall, 2 = Caisson, 3 = Dam 'BreakWaterHeight' REAL, + 'ShouldIllustrationPointsBeCalculated' TINYINT (1) NOT NULL, CONSTRAINT 'FK_HeightStructuresCalculationEntity_CalculationGroupEntity' FOREIGN KEY ('CalculationGroupEntityId') REFERENCES 'CalculationGroupEntity' ('CalculationGroupEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_HeightStructuresCalculationEntity_ForeshoreProfileEntity' FOREIGN KEY ('ForeshoreProfileEntityId') REFERENCES 'ForeshoreProfileEntity' ('ForeshoreProfileEntityId') ON DELETE Set Null ON UPDATE Cascade, CONSTRAINT 'FK_HeightStructuresCalculationEntity_HeightStructureEntity' FOREIGN KEY ('HeightStructureEntityId') REFERENCES 'HeightStructureEntity' ('HeightStructureEntityId') ON DELETE Set Null ON UPDATE Cascade, @@ -1267,6 +1269,7 @@ 'ModelFactorSuperCriticalFlowMean' REAL, 'StormDurationMean' REAL, 'FactorStormDurationOpenStructure' REAL, + 'ShouldIllustrationPointsBeCalculated' TINYINT (1) NOT NULL, CONSTRAINT 'FK_ClosingStructuresCalculationEntity_CalculationGroupEntity' FOREIGN KEY ('CalculationGroupEntityId') REFERENCES 'CalculationGroupEntity' ('CalculationGroupEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_ClosingStructuresCalculationEntity_ClosingStructureEntity' FOREIGN KEY ('ClosingStructureEntityId') REFERENCES 'ClosingStructureEntity' ('ClosingStructureEntityId') ON DELETE Set Null ON UPDATE Cascade, CONSTRAINT 'FK_ClosingStructuresCalculationEntity_ForeshoreProfileEntity' FOREIGN KEY ('ForeshoreProfileEntityId') REFERENCES 'ForeshoreProfileEntity' ('ForeshoreProfileEntityId') ON DELETE Set Null ON UPDATE Cascade, @@ -1903,6 +1906,17 @@ CREATE INDEX 'IXFK_HeightStructuresOutputEntity_HeightStructuresCalculationEntity' ON 'HeightStructuresOutputEntity' ('HeightStructuresCalculationEntityId' ASC) ; +CREATE TRIGGER [TR_AfterDeleteHeightStructuresOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON HeightStructuresOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +END; +; CREATE INDEX 'IXFK_HeightStructure_FailureMechanismEntity' ON 'HeightStructureEntity' ('FailureMechanismEntityId' ASC) @@ -1947,6 +1961,17 @@ CREATE INDEX 'IXFK_ClosingStructuresOutputEntity_ClosingStructuresCalculationEntity' ON 'ClosingStructuresOutputEntity' ('ClosingStructuresCalculationEntityId' ASC) ; +CREATE TRIGGER [TR_AfterDeleteClosingStructuresOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON ClosingStructuresOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +END; +; CREATE INDEX 'IXFK_StabilityPointStructureEntity_FailureMechanismEntity' ON 'StabilityPointStructureEntity' ('FailureMechanismEntityId' ASC) @@ -1955,6 +1980,17 @@ CREATE INDEX 'IXFK_StabilityPointStructuresOutputEntity_StabilityPointStructuresCalculationEntity' ON 'StabilityPointStructuresOutputEntity' ('StabilityPointStructuresCalculationEntityId' ASC) ; +CREATE TRIGGER [TR_AfterDeleteStabilityPointStructuresOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON StabilityPointStructuresOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +END; +; CREATE INDEX 'IXFK_HydraulicLocationOutputEntity_GeneralResultSubMechanismIllustrationPointEntity' ON 'HydraulicLocationOutputEntity' ('GeneralResultSubMechanismIllustrationPointEntityId' ASC) @@ -1964,13 +2000,13 @@ ON 'HydraulicLocationOutputEntity' ('HydraulicLocationEntityId' ASC) ; CREATE TRIGGER [TR_AfterDeleteHydraulicLocationOutputEntity_RemoveGeneralResultSubMechanismIllustrationPointEntity] - AFTER DELETE - ON HydraulicLocationOutputEntity - FOR EACH ROW - BEGIN - DELETE FROM GeneralResultSubMechanismIllustrationPointEntity - WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL AND - GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; + AFTER DELETE + ON HydraulicLocationOutputEntity + FOR EACH ROW +BEGIN + DELETE FROM GeneralResultSubMechanismIllustrationPointEntity + WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL + AND GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; END; ; @@ -1982,13 +2018,14 @@ ON 'GrassCoverErosionOutwardsHydraulicLocationOutputEntity' ('GrassCoverErosionOutwardsHydraulicLocationEntityId' ASC) ; CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionOuwardsHydraulicLocationOutputEntity_RemoveGeneralResultSubMechanismIllustrationPointEntity] - AFTER DELETE - ON GrassCoverErosionOutwardsHydraulicLocationOutputEntity - FOR EACH ROW - BEGIN - DELETE FROM GeneralResultSubMechanismIllustrationPointEntity - WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL AND - GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; + AFTER DELETE + ON GrassCoverErosionOutwardsHydraulicLocationOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultSubMechanismIllustrationPointEntity + WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL + AND GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; END; ; @@ -2028,9 +2065,10 @@ ON GeneralResultSubMechanismIllustrationPointStochastEntity FOR EACH ROW BEGIN - DELETE FROM StochastEntity - WHERE OLD.StochastEntityId IS NOT NULL AND - StochastEntityId IS OLD.StochastEntityId; + DELETE + FROM StochastEntity + WHERE OLD.StochastEntityId IS NOT NULL + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2053,7 +2091,7 @@ DELETE FROM StochastEntity WHERE OLD.StochastEntityId IS NOT NULL - AND StochastEntityId IS OLD.StochastEntityId; + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2070,9 +2108,9 @@ FOR EACH ROW BEGIN DELETE - FROM StochastEntity + FROM StochastEntity WHERE OLD.StochastEntityId IS NOT NULL - AND StochastEntityId IS OLD.StochastEntityId; + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2088,9 +2126,10 @@ ON TopLevelSubMechanismIllustrationPointEntity FOR EACH ROW BEGIN - DELETE FROM SubMechanismIllustrationPointEntity - WHERE OLD.SubMechanismIllustrationPointEntityId IS NOT NULL AND - SubMechanismIllustrationPointEntityId IS OLD.SubMechanismIllustrationPointEntityId; + DELETE + FROM SubMechanismIllustrationPointEntity + WHERE OLD.SubMechanismIllustrationPointEntityId IS NOT NULL + AND SubMechanismIllustrationPointEntityId IS OLD.SubMechanismIllustrationPointEntityId; END; ; @@ -2106,9 +2145,10 @@ ON TopLevelFaultTreeIllustrationPointEntity FOR EACH ROW BEGIN - DELETE FROM FaultTreeIllustrationPointEntity - WHERE OLD.FaultTreeIllustrationPointEntityId IS NOT NULL AND - FaultTreeIllustrationPointEntityId IS OLD.FaultTreeIllustrationPointEntityId; + DELETE + FROM FaultTreeIllustrationPointEntity + WHERE OLD.FaultTreeIllustrationPointEntityId IS NOT NULL + AND FaultTreeIllustrationPointEntityId IS OLD.FaultTreeIllustrationPointEntityId; END; ; @@ -2128,8 +2168,9 @@ ON FaultTreeSubmechanismIllustrationPointEntity FOR EACH ROW BEGIN - DELETE FROM SubmechanismIllustrationPointEntity - WHERE OLD.SubmechanismIllustrationPointEntityId IS NOT NULL AND - SubmechanismIllustrationPointEntityId IS OLD.SubmechanismIllustrationPointEntityId; + DELETE + FROM SubmechanismIllustrationPointEntity + WHERE OLD.SubmechanismIllustrationPointEntityId IS NOT NULL + AND SubmechanismIllustrationPointEntityId IS OLD.SubmechanismIllustrationPointEntityId; END; ; Index: Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql =================================================================== diff -u -re6a591b93ec33becef19b4d71f3d49de0fbd7f10 -rb5e832a216ef821659319f136efdd7fb6dd07ebd --- Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql (.../Migration_17.1_17.2.sql) (revision e6a591b93ec33becef19b4d71f3d49de0fbd7f10) +++ Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql (.../Migration_17.1_17.2.sql) (revision b5e832a216ef821659319f136efdd7fb6dd07ebd) @@ -85,7 +85,97 @@ AND CS.[FailuremechanismEntityId] = [FailuremechanismEntityId]) AS Suffix FROM [SOURCEPROJECT].ClosingStructureEntity CS JOIN (SELECT MAX(LENGTH([Id])) AS MaxLength FROM [SOURCEPROJECT].ClosingStructureEntity)); -INSERT INTO ClosingStructuresCalculationEntity SELECT * FROM [SOURCEPROJECT].ClosingStructuresCalculationEntity; +INSERT INTO ClosingStructuresCalculationEntity( + [ClosingStructuresCalculationEntityId], + [CalculationGroupEntityId], + [ForeshoreProfileEntityId], + [HydraulicLocationEntityId], + [ClosingStructureEntityId], + [Order], + [Name], + [Comments], + [UseBreakWater], + [BreakWaterType], + [BreakWaterHeight], + [UseForeshore], + [Orientation], + [StructureNormalOrientation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [LevelCrestStructureNotClosingMean], + [LevelCrestStructureNotClosingStandardDeviation], + [InsideWaterLevelMean], + [InsideWaterLevelStandardDeviation], + [ThresholdHeightOpenWeirMean], + [ThresholdHeightOpenWeirStandardDeviation], + [AreaFlowAperturesMean], + [AreaFlowAperturesStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [ProbabilityOrFrequencyOpenStructureBeforeFlooding], + [FailureProbabilityOpenStructure], + [IdenticalApertures], + [FailureProbabilityReparation], + [InflowModelType], + [FailureProbabilityStructureWithErosion], + [DeviationWaveDirection], + [DrainCoefficientMean], + [ModelFactorSuperCriticalFlowMean], + [StormDurationMean], + [FactorStormDurationOpenStructure], + [ShouldIllustrationPointsBeCalculated]) +SELECT + [ClosingStructuresCalculationEntityId], + [CalculationGroupEntityId], + [ForeshoreProfileEntityId], + [HydraulicLocationEntityId], + [ClosingStructureEntityId], + [Order], + [Name], + [Comments], + [UseBreakWater], + [BreakWaterType], + [BreakWaterHeight], + [UseForeshore], + [Orientation], + [StructureNormalOrientation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [LevelCrestStructureNotClosingMean], + [LevelCrestStructureNotClosingStandardDeviation], + [InsideWaterLevelMean], + [InsideWaterLevelStandardDeviation], + [ThresholdHeightOpenWeirMean], + [ThresholdHeightOpenWeirStandardDeviation], + [AreaFlowAperturesMean], + [AreaFlowAperturesStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [ProbabilityOrFrequencyOpenStructureBeforeFlooding], + [FailureProbabilityOpenStructure], + [IdenticalApertures], + [FailureProbabilityReparation], + [InflowModelType], + [FailureProbabilityStructureWithErosion], + [DeviationWaveDirection], + [DrainCoefficientMean], + [ModelFactorSuperCriticalFlowMean], + [StormDurationMean], + [FactorStormDurationOpenStructure], + 0 +FROM [SOURCEPROJECT].ClosingStructuresCalculationEntity; INSERT INTO ClosingStructuresFailureMechanismMetaEntity ( [ClosingStructuresFailureMechanismMetaEntityId], [FailureMechanismEntityId], @@ -285,7 +375,69 @@ AND HS.[FailuremechanismEntityId] = [FailuremechanismEntityId]) AS Suffix FROM [SOURCEPROJECT].HeightStructureEntity HS JOIN (SELECT MAX(LENGTH([Id])) AS MaxLength FROM [SOURCEPROJECT].HeightStructureEntity)); -INSERT INTO HeightStructuresCalculationEntity SELECT * FROM [SOURCEPROJECT].HeightStructuresCalculationEntity; +INSERT INTO HeightStructuresCalculationEntity( + [HeightStructuresCalculationEntityId], + [CalculationGroupEntityId], + [HydraulicLocationEntityId], + [HeightStructureEntityId], + [ForeshoreProfileEntityId], + [Order], + [Name], + [Comments], + [ModelFactorSuperCriticalFlowMean], + [StructureNormalOrientation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FailureProbabilityStructureWithErosion], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [StormDurationMean], + [LevelCrestStructureMean], + [LevelCrestStructureStandardDeviation], + [DeviationWaveDirection], + [UseBreakWater], + [UseForeshore], + [BreakWaterType], + [BreakWaterHeight], + [ShouldIllustrationPointsBeCalculated]) +SELECT + [HeightStructuresCalculationEntityId], + [CalculationGroupEntityId], + [HydraulicLocationEntityId], + [HeightStructureEntityId], + [ForeshoreProfileEntityId], + [Order], + [Name], + [Comments], + [ModelFactorSuperCriticalFlowMean], + [StructureNormalOrientation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FailureProbabilityStructureWithErosion], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [StormDurationMean], + [LevelCrestStructureMean], + [LevelCrestStructureStandardDeviation], + [DeviationWaveDirection], + [UseBreakWater], + [UseForeshore], + [BreakWaterType], + [BreakWaterHeight], + 0 +FROM [SOURCEPROJECT].HeightStructuresCalculationEntity; INSERT INTO HeightStructuresFailureMechanismMetaEntity ( [HeightStructuresFailureMechanismMetaEntityId], [FailureMechanismEntityId], @@ -517,7 +669,137 @@ AND SPS.[FailuremechanismEntityId] = [FailuremechanismEntityId]) AS Suffix FROM [SOURCEPROJECT].StabilityPointStructureEntity SPS JOIN (SELECT MAX(LENGTH([Id])) AS MaxLength FROM [SOURCEPROJECT].StabilityPointStructureEntity)); -INSERT INTO StabilityPointStructuresCalculationEntity SELECT * FROM [SOURCEPROJECT].StabilityPointStructuresCalculationEntity; +INSERT INTO StabilityPointStructuresCalculationEntity( + [StabilityPointStructuresCalculationEntityId], + [CalculationGroupEntityId], + [ForeshoreProfileEntityId], + [HydraulicLocationEntityId], + [StabilityPointStructureEntityId], + [Order], + [Name], + [Comments], + [UseBreakWater], + [BreakWaterType], + [BreakWaterHeight], + [UseForeshore], + [StructureNormalOrientation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [InsideWaterLevelMean], + [InsideWaterLevelStandardDeviation], + [ThresholdHeightOpenWeirMean], + [ThresholdHeightOpenWeirStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [ConstructiveStrengthLinearLoadModelMean], + [ConstructiveStrengthLinearLoadModelCoefficientOfVariation], + [ConstructiveStrengthQuadraticLoadModelMean], + [ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation], + [BankWidthMean], + [BankWidthStandardDeviation], + [InsideWaterLevelFailureConstructionMean], + [InsideWaterLevelFailureConstructionStandardDeviation], + [EvaluationLevel], + [LevelCrestStructureMean], + [LevelCrestStructureStandardDeviation], + [VerticalDistance], + [FailureProbabilityRepairClosure], + [FailureCollisionEnergyMean], + [FailureCollisionEnergyCoefficientOfVariation], + [ShipMassMean], + [ShipMassCoefficientOfVariation], + [ShipVelocityMean], + [ShipVelocityCoefficientOfVariation], + [LevellingCount], + [ProbabilityCollisionSecondaryStructure], + [FlowVelocityStructureClosableMean], + [StabilityLinearLoadModelMean], + [StabilityLinearLoadModelCoefficientOfVariation], + [StabilityQuadraticLoadModelMean], + [StabilityQuadraticLoadModelCoefficientOfVariation], + [AreaFlowAperturesMean], + [AreaFlowAperturesStandardDeviation], + [InflowModelType], + [LoadSchematizationType], + [VolumicWeightWater], + [StormDurationMean], + [ModelFactorSuperCriticalFlowMean], + [FactorStormDurationOpenStructure], + [DrainCoefficientMean], + [FailureProbabilityStructureWithErosion], + [ShouldIllustrationPointsBeCalculated]) +SELECT + [StabilityPointStructuresCalculationEntityId], + [CalculationGroupEntityId], + [ForeshoreProfileEntityId], + [HydraulicLocationEntityId], + [StabilityPointStructureEntityId], + [Order], + [Name], + [Comments], + [UseBreakWater], + [BreakWaterType], + [BreakWaterHeight], + [UseForeshore], + [StructureNormalOrientation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [InsideWaterLevelMean], + [InsideWaterLevelStandardDeviation], + [ThresholdHeightOpenWeirMean], + [ThresholdHeightOpenWeirStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [ConstructiveStrengthLinearLoadModelMean], + [ConstructiveStrengthLinearLoadModelCoefficientOfVariation], + [ConstructiveStrengthQuadraticLoadModelMean], + [ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation], + [BankWidthMean], + [BankWidthStandardDeviation], + [InsideWaterLevelFailureConstructionMean], + [InsideWaterLevelFailureConstructionStandardDeviation], + [EvaluationLevel], + [LevelCrestStructureMean], + [LevelCrestStructureStandardDeviation], + [VerticalDistance], + [FailureProbabilityRepairClosure], + [FailureCollisionEnergyMean], + [FailureCollisionEnergyCoefficientOfVariation], + [ShipMassMean], + [ShipMassCoefficientOfVariation], + [ShipVelocityMean], + [ShipVelocityCoefficientOfVariation], + [LevellingCount], + [ProbabilityCollisionSecondaryStructure], + [FlowVelocityStructureClosableMean], + [StabilityLinearLoadModelMean], + [StabilityLinearLoadModelCoefficientOfVariation], + [StabilityQuadraticLoadModelMean], + [StabilityQuadraticLoadModelCoefficientOfVariation], + [AreaFlowAperturesMean], + [AreaFlowAperturesStandardDeviation], + [InflowModelType], + [LoadSchematizationType], + [VolumicWeightWater], + [StormDurationMean], + [ModelFactorSuperCriticalFlowMean], + [FactorStormDurationOpenStructure], + [DrainCoefficientMean], + [FailureProbabilityStructureWithErosion], + 0 +FROM [SOURCEPROJECT].StabilityPointStructuresCalculationEntity; INSERT INTO StabilityPointStructuresFailureMechanismMetaEntity ( [StabilityPointStructuresFailureMechanismMetaEntityId], [FailureMechanismEntityId], Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresCalculationEntity.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -rb5e832a216ef821659319f136efdd7fb6dd07ebd --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresCalculationEntity.cs (.../ClosingStructuresCalculationEntity.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresCalculationEntity.cs (.../ClosingStructuresCalculationEntity.cs) (revision b5e832a216ef821659319f136efdd7fb6dd07ebd) @@ -67,6 +67,7 @@ public double? DeviationWaveDirection { get; set; } public double? DrainCoefficientMean { get; set; } public double? FactorStormDurationOpenStructure { get; set; } + public byte ShouldIllustrationPointsBeCalculated { get; set; } public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual ClosingStructureEntity ClosingStructureEntity { get; set; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresCalculationEntity.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -rb5e832a216ef821659319f136efdd7fb6dd07ebd --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresCalculationEntity.cs (.../HeightStructuresCalculationEntity.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresCalculationEntity.cs (.../HeightStructuresCalculationEntity.cs) (revision b5e832a216ef821659319f136efdd7fb6dd07ebd) @@ -53,6 +53,7 @@ public double? LevelCrestStructureMean { get; set; } public double? LevelCrestStructureStandardDeviation { get; set; } public double? DeviationWaveDirection { get; set; } + public byte ShouldIllustrationPointsBeCalculated { get; set; } public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual HeightStructureEntity HeightStructureEntity { get; set; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx =================================================================== diff -u -re6a591b93ec33becef19b4d71f3d49de0fbd7f10 -rb5e832a216ef821659319f136efdd7fb6dd07ebd --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision e6a591b93ec33becef19b4d71f3d49de0fbd7f10) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision b5e832a216ef821659319f136efdd7fb6dd07ebd) @@ -144,6 +144,7 @@ + @@ -593,6 +594,7 @@ + @@ -947,6 +949,7 @@ + @@ -3818,6 +3821,7 @@ + @@ -4343,6 +4347,7 @@ + @@ -4740,6 +4745,7 @@ + @@ -6458,6 +6464,7 @@ + @@ -6919,6 +6926,7 @@ + @@ -7259,6 +7267,7 @@ + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram =================================================================== diff -u -re6a591b93ec33becef19b4d71f3d49de0fbd7f10 -rb5e832a216ef821659319f136efdd7fb6dd07ebd --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision e6a591b93ec33becef19b4d71f3d49de0fbd7f10) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision b5e832a216ef821659319f136efdd7fb6dd07ebd) @@ -5,86 +5,86 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresCalculationEntity.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -rb5e832a216ef821659319f136efdd7fb6dd07ebd --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresCalculationEntity.cs (.../StabilityPointStructuresCalculationEntity.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresCalculationEntity.cs (.../StabilityPointStructuresCalculationEntity.cs) (revision b5e832a216ef821659319f136efdd7fb6dd07ebd) @@ -87,6 +87,7 @@ public double? VolumicWeightWater { get; set; } public double? FactorStormDurationOpenStructure { get; set; } public double? DrainCoefficientMean { get; set; } + public byte ShouldIllustrationPointsBeCalculated { get; set; } public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual StabilityPointStructureEntity StabilityPointStructureEntity { get; set; } Index: build/DatabaseStructure.sql =================================================================== diff -u -re6a591b93ec33becef19b4d71f3d49de0fbd7f10 -rb5e832a216ef821659319f136efdd7fb6dd07ebd --- build/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision e6a591b93ec33becef19b4d71f3d49de0fbd7f10) +++ build/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision b5e832a216ef821659319f136efdd7fb6dd07ebd) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 13-Jul-2017 2:06:57 PM */ +/* Created On : 13-Jul-2017 3:10:18 PM */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -373,6 +373,7 @@ 'FactorStormDurationOpenStructure' REAL, 'DrainCoefficientMean' REAL, 'FailureProbabilityStructureWithErosion' REAL NOT NULL, + 'ShouldIllustrationPointsBeCalculated' TINYINT (1) NOT NULL, CONSTRAINT 'FK_StabilityPointStructuresCalculationEntity_CalculationGroupEntity' FOREIGN KEY ('CalculationGroupEntityId') REFERENCES 'CalculationGroupEntity' ('CalculationGroupEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_StabilityPointStructuresCalculationEntity_ForeshoreProfileEntity' FOREIGN KEY ('ForeshoreProfileEntityId') REFERENCES 'ForeshoreProfileEntity' ('ForeshoreProfileEntityId') ON DELETE Set Null ON UPDATE Cascade, CONSTRAINT 'FK_StabilityPointStructuresCalculationEntity_HydraulicLocationEntity' FOREIGN KEY ('HydraulicLocationEntityId') REFERENCES 'HydraulicLocationEntity' ('HydraulicLocationEntityId') ON DELETE Set Null ON UPDATE Cascade, @@ -1177,6 +1178,7 @@ 'UseForeshore' TINYINT (1) NOT NULL, -- true or false 'BreakWaterType' TINYINT (1) NOT NULL, -- Enum: 1 = Wall, 2 = Caisson, 3 = Dam 'BreakWaterHeight' REAL, + 'ShouldIllustrationPointsBeCalculated' TINYINT (1) NOT NULL, CONSTRAINT 'FK_HeightStructuresCalculationEntity_CalculationGroupEntity' FOREIGN KEY ('CalculationGroupEntityId') REFERENCES 'CalculationGroupEntity' ('CalculationGroupEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_HeightStructuresCalculationEntity_ForeshoreProfileEntity' FOREIGN KEY ('ForeshoreProfileEntityId') REFERENCES 'ForeshoreProfileEntity' ('ForeshoreProfileEntityId') ON DELETE Set Null ON UPDATE Cascade, CONSTRAINT 'FK_HeightStructuresCalculationEntity_HeightStructureEntity' FOREIGN KEY ('HeightStructureEntityId') REFERENCES 'HeightStructureEntity' ('HeightStructureEntityId') ON DELETE Set Null ON UPDATE Cascade, @@ -1267,6 +1269,7 @@ 'ModelFactorSuperCriticalFlowMean' REAL, 'StormDurationMean' REAL, 'FactorStormDurationOpenStructure' REAL, + 'ShouldIllustrationPointsBeCalculated' TINYINT (1) NOT NULL, CONSTRAINT 'FK_ClosingStructuresCalculationEntity_CalculationGroupEntity' FOREIGN KEY ('CalculationGroupEntityId') REFERENCES 'CalculationGroupEntity' ('CalculationGroupEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_ClosingStructuresCalculationEntity_ClosingStructureEntity' FOREIGN KEY ('ClosingStructureEntityId') REFERENCES 'ClosingStructureEntity' ('ClosingStructureEntityId') ON DELETE Set Null ON UPDATE Cascade, CONSTRAINT 'FK_ClosingStructuresCalculationEntity_ForeshoreProfileEntity' FOREIGN KEY ('ForeshoreProfileEntityId') REFERENCES 'ForeshoreProfileEntity' ('ForeshoreProfileEntityId') ON DELETE Set Null ON UPDATE Cascade, @@ -1903,6 +1906,17 @@ CREATE INDEX 'IXFK_HeightStructuresOutputEntity_HeightStructuresCalculationEntity' ON 'HeightStructuresOutputEntity' ('HeightStructuresCalculationEntityId' ASC) ; +CREATE TRIGGER [TR_AfterDeleteHeightStructuresOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON HeightStructuresOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +END; +; CREATE INDEX 'IXFK_HeightStructure_FailureMechanismEntity' ON 'HeightStructureEntity' ('FailureMechanismEntityId' ASC) @@ -1947,6 +1961,17 @@ CREATE INDEX 'IXFK_ClosingStructuresOutputEntity_ClosingStructuresCalculationEntity' ON 'ClosingStructuresOutputEntity' ('ClosingStructuresCalculationEntityId' ASC) ; +CREATE TRIGGER [TR_AfterDeleteClosingStructuresOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON ClosingStructuresOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +END; +; CREATE INDEX 'IXFK_StabilityPointStructureEntity_FailureMechanismEntity' ON 'StabilityPointStructureEntity' ('FailureMechanismEntityId' ASC) @@ -1955,6 +1980,17 @@ CREATE INDEX 'IXFK_StabilityPointStructuresOutputEntity_StabilityPointStructuresCalculationEntity' ON 'StabilityPointStructuresOutputEntity' ('StabilityPointStructuresCalculationEntityId' ASC) ; +CREATE TRIGGER [TR_AfterDeleteStabilityPointStructuresOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON StabilityPointStructuresOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +END; +; CREATE INDEX 'IXFK_HydraulicLocationOutputEntity_GeneralResultSubMechanismIllustrationPointEntity' ON 'HydraulicLocationOutputEntity' ('GeneralResultSubMechanismIllustrationPointEntityId' ASC) @@ -1964,13 +2000,13 @@ ON 'HydraulicLocationOutputEntity' ('HydraulicLocationEntityId' ASC) ; CREATE TRIGGER [TR_AfterDeleteHydraulicLocationOutputEntity_RemoveGeneralResultSubMechanismIllustrationPointEntity] - AFTER DELETE - ON HydraulicLocationOutputEntity - FOR EACH ROW - BEGIN - DELETE FROM GeneralResultSubMechanismIllustrationPointEntity - WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL AND - GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; + AFTER DELETE + ON HydraulicLocationOutputEntity + FOR EACH ROW +BEGIN + DELETE FROM GeneralResultSubMechanismIllustrationPointEntity + WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL + AND GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; END; ; @@ -1982,13 +2018,14 @@ ON 'GrassCoverErosionOutwardsHydraulicLocationOutputEntity' ('GrassCoverErosionOutwardsHydraulicLocationEntityId' ASC) ; CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionOuwardsHydraulicLocationOutputEntity_RemoveGeneralResultSubMechanismIllustrationPointEntity] - AFTER DELETE - ON GrassCoverErosionOutwardsHydraulicLocationOutputEntity - FOR EACH ROW - BEGIN - DELETE FROM GeneralResultSubMechanismIllustrationPointEntity - WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL AND - GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; + AFTER DELETE + ON GrassCoverErosionOutwardsHydraulicLocationOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultSubMechanismIllustrationPointEntity + WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL + AND GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; END; ; @@ -2028,9 +2065,10 @@ ON GeneralResultSubMechanismIllustrationPointStochastEntity FOR EACH ROW BEGIN - DELETE FROM StochastEntity - WHERE OLD.StochastEntityId IS NOT NULL AND - StochastEntityId IS OLD.StochastEntityId; + DELETE + FROM StochastEntity + WHERE OLD.StochastEntityId IS NOT NULL + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2053,7 +2091,7 @@ DELETE FROM StochastEntity WHERE OLD.StochastEntityId IS NOT NULL - AND StochastEntityId IS OLD.StochastEntityId; + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2070,9 +2108,9 @@ FOR EACH ROW BEGIN DELETE - FROM StochastEntity + FROM StochastEntity WHERE OLD.StochastEntityId IS NOT NULL - AND StochastEntityId IS OLD.StochastEntityId; + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2088,9 +2126,10 @@ ON TopLevelSubMechanismIllustrationPointEntity FOR EACH ROW BEGIN - DELETE FROM SubMechanismIllustrationPointEntity - WHERE OLD.SubMechanismIllustrationPointEntityId IS NOT NULL AND - SubMechanismIllustrationPointEntityId IS OLD.SubMechanismIllustrationPointEntityId; + DELETE + FROM SubMechanismIllustrationPointEntity + WHERE OLD.SubMechanismIllustrationPointEntityId IS NOT NULL + AND SubMechanismIllustrationPointEntityId IS OLD.SubMechanismIllustrationPointEntityId; END; ; @@ -2106,9 +2145,10 @@ ON TopLevelFaultTreeIllustrationPointEntity FOR EACH ROW BEGIN - DELETE FROM FaultTreeIllustrationPointEntity - WHERE OLD.FaultTreeIllustrationPointEntityId IS NOT NULL AND - FaultTreeIllustrationPointEntityId IS OLD.FaultTreeIllustrationPointEntityId; + DELETE + FROM FaultTreeIllustrationPointEntity + WHERE OLD.FaultTreeIllustrationPointEntityId IS NOT NULL + AND FaultTreeIllustrationPointEntityId IS OLD.FaultTreeIllustrationPointEntityId; END; ; @@ -2128,8 +2168,9 @@ ON FaultTreeSubmechanismIllustrationPointEntity FOR EACH ROW BEGIN - DELETE FROM SubmechanismIllustrationPointEntity - WHERE OLD.SubmechanismIllustrationPointEntityId IS NOT NULL AND - SubmechanismIllustrationPointEntityId IS OLD.SubmechanismIllustrationPointEntityId; + DELETE + FROM SubmechanismIllustrationPointEntity + WHERE OLD.SubmechanismIllustrationPointEntityId IS NOT NULL + AND SubmechanismIllustrationPointEntityId IS OLD.SubmechanismIllustrationPointEntityId; END; ; Index: design/DatabaseDesign.eap =================================================================== diff -u -re6a591b93ec33becef19b4d71f3d49de0fbd7f10 -rb5e832a216ef821659319f136efdd7fb6dd07ebd Binary files differ