Index: Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql =================================================================== diff -u -r0641053e020a1478f793ee17e753df60af26171f -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql (.../DatabaseStructure17.2.sql) (revision 0641053e020a1478f793ee17e753df60af26171f) +++ Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/DatabaseStructure17.2.sql (.../DatabaseStructure17.2.sql) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 20-Sep-2017 9:43:01 AM */ +/* Created On : 20-Sep-2017 10:49:48 AM */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -619,9 +619,9 @@ 'MaterialName' TEXT NOT NULL, 'BelowPhreaticLevelMean' REAL, 'BelowPhreaticLevelDeviation' REAL, + 'BelowPhreaticLevelShift' REAL, 'DiameterD70Mean' REAL, 'DiameterD70CoefficientOfVariation' REAL, - 'BelowPhreaticLevelShift' REAL, 'PermeabilityMean' REAL, 'PermeabilityCoefficientOfVariation' REAL, 'Order' INT (4) NOT NULL, @@ -1785,15 +1785,15 @@ CREATE INDEX 'IXFK_GrassCoverErosionInwardsDikeHeightOutputEntity_GrassCoverErosionInwardsOutputEntity' ON 'GrassCoverErosionInwardsDikeHeightOutputEntity' ('GrassCoverErosionInwardsOutputEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionInwardsDikeHeightOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] - AFTER DELETE - ON GrassCoverErosionInwardsDikeHeightOutputEntity - FOR EACH ROW -BEGIN - DELETE - FROM GeneralResultFaultTreeIllustrationPointEntity - WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL - AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionInwardsDikeHeightOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON GrassCoverErosionInwardsDikeHeightOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; END; ; @@ -2032,15 +2032,15 @@ CREATE INDEX 'IXFK_GrassCoverErosionInwardsOutputEntity_GrassCoverErosionInwardsCalculationEntity' ON 'GrassCoverErosionInwardsOutputEntity' ('GrassCoverErosionInwardsCalculationEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionInwardsOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] - AFTER DELETE - ON GrassCoverErosionInwardsOutputEntity - FOR EACH ROW -BEGIN - DELETE - FROM GeneralResultFaultTreeIllustrationPointEntity - WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL - AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionInwardsOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON GrassCoverErosionInwardsOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; END; ; @@ -2103,15 +2103,15 @@ 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; +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; ; @@ -2158,15 +2158,15 @@ 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; +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; ; @@ -2177,15 +2177,15 @@ 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; +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; ; @@ -2196,15 +2196,15 @@ CREATE INDEX 'IXFK_HydraulicLocationOutputEntity_HydraulicLocationEntity' 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; +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; END; ; @@ -2215,15 +2215,15 @@ CREATE INDEX 'IXFK_GrassCoverErosionOutwardsHydraulicLocationOutputEntity_GrassCoverErosionOutwardsHydraulicLocationEntity' ON 'GrassCoverErosionOutwardsHydraulicLocationOutputEntity' ('GrassCoverErosionOutwardsHydraulicLocationEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionOutwardsHydraulicLocationOutputEntity_RemoveGeneralResultSubMechanismIllustrationPointEntity] - AFTER DELETE - ON GrassCoverErosionOutwardsHydraulicLocationOutputEntity - FOR EACH ROW -BEGIN - DELETE - FROM GeneralResultSubMechanismIllustrationPointEntity - WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL - AND GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; +CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionOutwardsHydraulicLocationOutputEntity_RemoveGeneralResultSubMechanismIllustrationPointEntity] + AFTER DELETE + ON GrassCoverErosionOutwardsHydraulicLocationOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultSubMechanismIllustrationPointEntity + WHERE OLD.GeneralResultSubMechanismIllustrationPointEntityId IS NOT NULL + AND GeneralResultSubMechanismIllustrationPointEntityId IS OLD.GeneralResultSubMechanismIllustrationPointEntityId; END; ; @@ -2250,15 +2250,15 @@ CREATE INDEX 'IXFK_GrassCoverErosionInwardsOvertoppingRateOutputEntity_GrassCoverErosionInwardsOutputEntity' ON 'GrassCoverErosionInwardsOvertoppingRateOutputEntity' ('GrassCoverErosionInwardsOutputEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionInwardsOvertoppingRateOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] - AFTER DELETE - ON GrassCoverErosionInwardsOvertoppingRateOutputEntity - FOR EACH ROW -BEGIN - DELETE - FROM GeneralResultFaultTreeIllustrationPointEntity - WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL - AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; +CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionInwardsOvertoppingRateOutputEntity_RemoveGeneralResultFaultTreeIllustrationPointEntity] + AFTER DELETE + ON GrassCoverErosionInwardsOvertoppingRateOutputEntity + FOR EACH ROW +BEGIN + DELETE + FROM GeneralResultFaultTreeIllustrationPointEntity + WHERE OLD.GeneralResultFaultTreeIllustrationPointEntityId IS NOT NULL + AND GeneralResultFaultTreeIllustrationPointEntityId IS OLD.GeneralResultFaultTreeIllustrationPointEntityId; END; ; @@ -2273,15 +2273,15 @@ CREATE INDEX 'IXFK_GeneralResultSubMechanismIllustrationPointStochastEntity_StochastEntity' ON 'GeneralResultSubMechanismIllustrationPointStochastEntity' ('StochastEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteGeneralResultSubMechanismIllustrationPointStochastEntity_RemoveStochastEntity] - AFTER DELETE - ON GeneralResultSubMechanismIllustrationPointStochastEntity - FOR EACH ROW -BEGIN - DELETE - FROM StochastEntity - WHERE OLD.StochastEntityId IS NOT NULL - AND StochastEntityId IS OLD.StochastEntityId; +CREATE TRIGGER [TR_AfterDeleteGeneralResultSubMechanismIllustrationPointStochastEntity_RemoveStochastEntity] + AFTER DELETE + ON GeneralResultSubMechanismIllustrationPointStochastEntity + FOR EACH ROW +BEGIN + DELETE + FROM StochastEntity + WHERE OLD.StochastEntityId IS NOT NULL + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2296,15 +2296,15 @@ CREATE INDEX 'IXFK_FaultTreeIllustrationPointStochastEntity_StochastEntity' ON 'FaultTreeIllustrationPointStochastEntity' ('StochastEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteFaultTreeIllustrationPointStochastEntity_RemoveStochastEntity] - AFTER DELETE - ON FaultTreeIllustrationPointStochastEntity - FOR EACH ROW -BEGIN - DELETE - FROM StochastEntity - WHERE OLD.StochastEntityId IS NOT NULL - AND StochastEntityId IS OLD.StochastEntityId; +CREATE TRIGGER [TR_AfterDeleteFaultTreeIllustrationPointStochastEntity_RemoveStochastEntity] + AFTER DELETE + ON FaultTreeIllustrationPointStochastEntity + FOR EACH ROW +BEGIN + DELETE + FROM StochastEntity + WHERE OLD.StochastEntityId IS NOT NULL + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2315,15 +2315,15 @@ CREATE INDEX 'IXFK_GeneralResultFaultTreeIllustrationPointStochastEntity_StochastEntity' ON 'GeneralResultFaultTreeIllustrationPointStochastEntity' ('StochastEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteGeneralResultFaultTreeIllustrationPointStochastEntity_RemoveStochastEntity] - AFTER DELETE - ON GeneralResultFaultTreeIllustrationPointStochastEntity - FOR EACH ROW -BEGIN - DELETE - FROM StochastEntity - WHERE OLD.StochastEntityId IS NOT NULL - AND StochastEntityId IS OLD.StochastEntityId; +CREATE TRIGGER [TR_AfterDeleteGeneralResultFaultTreeIllustrationPointStochastEntity_RemoveStochastEntity] + AFTER DELETE + ON GeneralResultFaultTreeIllustrationPointStochastEntity + FOR EACH ROW +BEGIN + DELETE + FROM StochastEntity + WHERE OLD.StochastEntityId IS NOT NULL + AND StochastEntityId IS OLD.StochastEntityId; END; ; @@ -2334,15 +2334,15 @@ CREATE INDEX 'IXFK_TopLevelSubMechanismIllustrationPointEntity_SubMechanismIllustrationPointEntity' ON 'TopLevelSubMechanismIllustrationPointEntity' ('SubMechanismIllustrationPointEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteTopLevelSubMechanismIllustrationPointEntity_RemoveSubMechanismIllustrationPointEntity] - AFTER DELETE - ON TopLevelSubMechanismIllustrationPointEntity - FOR EACH ROW -BEGIN - DELETE - FROM SubMechanismIllustrationPointEntity - WHERE OLD.SubMechanismIllustrationPointEntityId IS NOT NULL - AND SubMechanismIllustrationPointEntityId IS OLD.SubMechanismIllustrationPointEntityId; +CREATE TRIGGER [TR_AfterDeleteTopLevelSubMechanismIllustrationPointEntity_RemoveSubMechanismIllustrationPointEntity] + AFTER DELETE + ON TopLevelSubMechanismIllustrationPointEntity + FOR EACH ROW +BEGIN + DELETE + FROM SubMechanismIllustrationPointEntity + WHERE OLD.SubMechanismIllustrationPointEntityId IS NOT NULL + AND SubMechanismIllustrationPointEntityId IS OLD.SubMechanismIllustrationPointEntityId; END; ; @@ -2353,15 +2353,15 @@ CREATE INDEX 'IXFK_TopLevelFaultTreeIllustrationPointEntity_GeneralResultFaultTreeIllustrationPointEntity' ON 'TopLevelFaultTreeIllustrationPointEntity' ('GeneralResultFaultTreeIllustrationPointEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteTopLevelFaultTreeIllustrationPointEntity_RemoveFaultTreeIllustrationPointEntity] - AFTER DELETE - ON TopLevelFaultTreeIllustrationPointEntity - FOR EACH ROW -BEGIN - DELETE - FROM FaultTreeIllustrationPointEntity - WHERE OLD.FaultTreeIllustrationPointEntityId IS NOT NULL - AND FaultTreeIllustrationPointEntityId IS OLD.FaultTreeIllustrationPointEntityId; +CREATE TRIGGER [TR_AfterDeleteTopLevelFaultTreeIllustrationPointEntity_RemoveFaultTreeIllustrationPointEntity] + AFTER DELETE + ON TopLevelFaultTreeIllustrationPointEntity + FOR EACH ROW +BEGIN + DELETE + FROM FaultTreeIllustrationPointEntity + WHERE OLD.FaultTreeIllustrationPointEntityId IS NOT NULL + AND FaultTreeIllustrationPointEntityId IS OLD.FaultTreeIllustrationPointEntityId; END; ; @@ -2376,15 +2376,15 @@ CREATE INDEX 'IXFK_FaultTreeIllustrationPointEntity_SubMechanismIllustrationPointEntity' ON 'FaultTreeSubmechanismIllustrationPointEntity' ('SubMechanismIllustrationPointEntityId' ASC) ; -CREATE TRIGGER [TR_AfterDeleteFaultTreeSubmechanismIllustrationPointEntity_RemoveSubmechanismIllustrationPointEntity] - AFTER DELETE - ON FaultTreeSubmechanismIllustrationPointEntity - FOR EACH ROW -BEGIN - DELETE - FROM SubmechanismIllustrationPointEntity - WHERE OLD.SubmechanismIllustrationPointEntityId IS NOT NULL - AND SubmechanismIllustrationPointEntityId IS OLD.SubmechanismIllustrationPointEntityId; +CREATE TRIGGER [TR_AfterDeleteFaultTreeSubmechanismIllustrationPointEntity_RemoveSubmechanismIllustrationPointEntity] + AFTER DELETE + ON FaultTreeSubmechanismIllustrationPointEntity + FOR EACH ROW +BEGIN + DELETE + FROM SubmechanismIllustrationPointEntity + WHERE OLD.SubmechanismIllustrationPointEntityId IS NOT NULL + AND SubmechanismIllustrationPointEntityId IS OLD.SubmechanismIllustrationPointEntityId; END; ; @@ -2403,38 +2403,38 @@ CREATE INDEX 'IXFK_MacroStabilityInwardsStochasticSoilProfileEntity_StochasticSoilModelEntity' ON 'MacroStabilityInwardsStochasticSoilProfileEntity' ('StochasticSoilModelEntityId' ASC) ; -CREATE TRIGGER [TR_BeforeInsertMacroStabilityInwardsStochasticSoilProfileEntity_MustHaveOneDOrTwoD] - BEFORE INSERT - ON MacroStabilityInwardsStochasticSoilProfileEntity - FOR EACH ROW -BEGIN - SELECT - CASE - WHEN - ( - NEW.MacroStabilityInwardsSoilProfileOneDEntityId IS NULL AND NEW.MacroStabilityInwardsSoilProfileTwoDEntityId IS NULL - ) OR ( - NEW.MacroStabilityInwardsSoilProfileOneDEntityId IS NOT NULL AND NEW.MacroStabilityInwardsSoilProfileTwoDEntityId IS NOT NULL - ) - THEN RAISE(FAIL, 'Either SoilProfile1D or SoilProfile2D must be set.') - END; +CREATE TRIGGER [TR_BeforeInsertMacroStabilityInwardsStochasticSoilProfileEntity_MustHaveOneDOrTwoD] + BEFORE INSERT + ON MacroStabilityInwardsStochasticSoilProfileEntity + FOR EACH ROW +BEGIN + SELECT + CASE + WHEN + ( + NEW.MacroStabilityInwardsSoilProfileOneDEntityId IS NULL AND NEW.MacroStabilityInwardsSoilProfileTwoDEntityId IS NULL + ) OR ( + NEW.MacroStabilityInwardsSoilProfileOneDEntityId IS NOT NULL AND NEW.MacroStabilityInwardsSoilProfileTwoDEntityId IS NOT NULL + ) + THEN RAISE(FAIL, 'Either SoilProfile1D or SoilProfile2D must be set.') + END; END; ; -CREATE TRIGGER [TR_BeforeUpdateMacroStabilityInwardsStochasticSoilProfileEntity_MustHaveOneDOrTwoD] - BEFORE UPDATE - ON MacroStabilityInwardsStochasticSoilProfileEntity - FOR EACH ROW -BEGIN - SELECT - CASE - WHEN - ( - NEW.MacroStabilityInwardsSoilProfileOneDEntityId IS NULL AND NEW.MacroStabilityInwardsSoilProfileTwoDEntityId IS NULL - ) OR ( - NEW.MacroStabilityInwardsSoilProfileOneDEntityId IS NOT NULL AND NEW.MacroStabilityInwardsSoilProfileTwoDEntityId IS NOT NULL - ) - THEN RAISE(FAIL, 'Either SoilProfile1D or SoilProfile2D must be set.') - END; +CREATE TRIGGER [TR_BeforeUpdateMacroStabilityInwardsStochasticSoilProfileEntity_MustHaveOneDOrTwoD] + BEFORE UPDATE + ON MacroStabilityInwardsStochasticSoilProfileEntity + FOR EACH ROW +BEGIN + SELECT + CASE + WHEN + ( + NEW.MacroStabilityInwardsSoilProfileOneDEntityId IS NULL AND NEW.MacroStabilityInwardsSoilProfileTwoDEntityId IS NULL + ) OR ( + NEW.MacroStabilityInwardsSoilProfileOneDEntityId IS NOT NULL AND NEW.MacroStabilityInwardsSoilProfileTwoDEntityId IS NOT NULL + ) + THEN RAISE(FAIL, 'Either SoilProfile1D or SoilProfile2D must be set.') + END; END; ; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs =================================================================== diff -u -r8e213638a22dd9f04d965d875bb58156db019be5 -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs (.../PersistenceRegistry.cs) (revision 8e213638a22dd9f04d965d875bb58156db019be5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs (.../PersistenceRegistry.cs) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -160,7 +160,7 @@ /// to be registered. /// The to /// be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(GrassCoverErosionInwardsCalculationEntity entity, GrassCoverErosionInwardsCalculation model) { Register(grassCoverErosionInwardsCalculations, entity, model); @@ -172,7 +172,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(FailureMechanismSectionEntity entity, FailureMechanismSection model) { Register(failureMechanismSections, entity, model); @@ -184,7 +184,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(DikeProfileEntity entity, DikeProfile model) { Register(dikeProfiles, entity, model); @@ -196,7 +196,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(ForeshoreProfileEntity entity, ForeshoreProfile model) { Register(foreshoreProfiles, entity, model); @@ -208,7 +208,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(HydraulicLocationEntity entity, HydraulicBoundaryLocation model) { Register(hydraulicLocations, entity, model); @@ -220,7 +220,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(GrassCoverErosionOutwardsHydraulicLocationEntity entity, HydraulicBoundaryLocation model) { Register(hydraulicLocations, entity, model); @@ -232,7 +232,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(DuneLocationEntity entity, DuneLocation model) { Register(duneLocations, entity, model); @@ -244,7 +244,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(StochasticSoilModelEntity entity, PipingStochasticSoilModel model) { Register(pipingStochasticSoilModels, entity, model); @@ -256,7 +256,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(PipingStochasticSoilProfileEntity entity, PipingStochasticSoilProfile model) { Register(pipingStochasticSoilProfiles, entity, model); @@ -268,7 +268,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(PipingSoilProfileEntity entity, PipingSoilProfile model) { Register(pipingSoilProfiles, entity, model); @@ -280,7 +280,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(SurfaceLineEntity entity, PipingSurfaceLine model) { Register(pipingSurfaceLines, entity, model); @@ -292,7 +292,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(StochasticSoilModelEntity entity, MacroStabilityInwardsStochasticSoilModel model) { Register(macroStabilityInwardsStochasticSoilModels, entity, model); @@ -304,7 +304,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(MacroStabilityInwardsStochasticSoilProfileEntity entity, MacroStabilityInwardsStochasticSoilProfile model) { Register(macroStabilityInwardsStochasticSoilProfiles, entity, model); @@ -316,7 +316,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(MacroStabilityInwardsSoilProfileOneDEntity entity, MacroStabilityInwardsSoilProfile1D model) { Register(macroStabilityInwardsSoil1DProfiles, entity, model); @@ -328,7 +328,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(MacroStabilityInwardsSoilProfileTwoDEntity entity, MacroStabilityInwardsSoilProfile2D model) { Register(macroStabilityInwardsSoil2DProfiles, entity, model); @@ -340,7 +340,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(SurfaceLineEntity entity, MacroStabilityInwardsSurfaceLine model) { Register(macroStabilityInwardsSurfaceLines, entity, model); @@ -352,7 +352,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(HeightStructureEntity entity, HeightStructure model) { Register(heightStructures, entity, model); @@ -364,7 +364,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(ClosingStructureEntity entity, ClosingStructure model) { Register(closingStructures, entity, model); @@ -376,7 +376,7 @@ /// /// The to be registered. /// The to be registered. - /// Thrown any of the input parameters is null. + /// Thrown when any of the input parameters is null. internal void Register(StabilityPointStructureEntity entity, StabilityPointStructure model) { Register(stabilityPointStructures, entity, model); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingSurfaceLineCreateExtensions.cs =================================================================== diff -u -r268d5940d8ed4a65319179de7515eaf89586ad0a -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingSurfaceLineCreateExtensions.cs (.../PipingSurfaceLineCreateExtensions.cs) (revision 268d5940d8ed4a65319179de7515eaf89586ad0a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingSurfaceLineCreateExtensions.cs (.../PipingSurfaceLineCreateExtensions.cs) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -97,7 +97,7 @@ { var entity = new PipingCharacteristicPointEntity { - Type = (byte) type, + Type = Convert.ToByte(type), X = point.X.ToNaNAsNull(), Y = point.Y.ToNaNAsNull(), Z = point.Z.ToNaNAsNull() Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSoilLayerEntity.cs =================================================================== diff -u -ra096cb901099c85dbaafa2dba6c69288464c248e -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSoilLayerEntity.cs (.../PipingSoilLayerEntity.cs) (revision a096cb901099c85dbaafa2dba6c69288464c248e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSoilLayerEntity.cs (.../PipingSoilLayerEntity.cs) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -40,9 +40,9 @@ public string MaterialName { get; set; } public double? BelowPhreaticLevelMean { get; set; } public double? BelowPhreaticLevelDeviation { get; set; } + public double? BelowPhreaticLevelShift { get; set; } public double? DiameterD70Mean { get; set; } public double? DiameterD70CoefficientOfVariation { get; set; } - public double? BelowPhreaticLevelShift { get; set; } public double? PermeabilityMean { get; set; } public double? PermeabilityCoefficientOfVariation { get; set; } public int Order { get; set; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx =================================================================== diff -u -r0641053e020a1478f793ee17e753df60af26171f -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision 0641053e020a1478f793ee17e753df60af26171f) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -922,9 +922,9 @@ + - @@ -5095,9 +5095,9 @@ + - @@ -7947,9 +7947,9 @@ - + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram =================================================================== diff -u -r0641053e020a1478f793ee17e753df60af26171f -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision 0641053e020a1478f793ee17e753df60af26171f) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -6,93 +6,93 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - + - - - - + + + + - - - - - + + + + + Index: Application/Ringtoets/test/Application.Ringtoets.Migration.Core.Test/test-data/Empty valid Release 17.1.rtd =================================================================== diff -u -ra096cb901099c85dbaafa2dba6c69288464c248e -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 Binary files differ Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSoilProfileCreateExtensionsTest.cs =================================================================== diff -u -rb0b8bffcbb871a42e6c8b282fe20858d6a738dbc -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSoilProfileCreateExtensionsTest.cs (.../PipingSoilProfileCreateExtensionsTest.cs) (revision b0b8bffcbb871a42e6c8b282fe20858d6a738dbc) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSoilProfileCreateExtensionsTest.cs (.../PipingSoilProfileCreateExtensionsTest.cs) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -23,6 +23,7 @@ using Application.Ringtoets.Storage.Create; using Application.Ringtoets.Storage.Create.Piping; using Application.Ringtoets.Storage.DbContext; +using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Piping.Primitives; using Ringtoets.Piping.Primitives.TestUtil; @@ -87,9 +88,7 @@ PipingSoilProfileEntity entity = soilProfile.Create(registry); // Assert - Assert.AreNotSame(testName, entity.Name, - "To create stable binary representations/fingerprints, it's really important that strings are not shared."); - Assert.AreEqual(testName, entity.Name); + TestHelper.AssertAreEqualButNotSame(testName, entity.Name); } [Test] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSurfaceLineCreateExtensionsTest.cs =================================================================== diff -u -r268d5940d8ed4a65319179de7515eaf89586ad0a -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSurfaceLineCreateExtensionsTest.cs (.../PipingSurfaceLineCreateExtensionsTest.cs) (revision 268d5940d8ed4a65319179de7515eaf89586ad0a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingSurfaceLineCreateExtensionsTest.cs (.../PipingSurfaceLineCreateExtensionsTest.cs) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -85,8 +85,6 @@ Assert.AreEqual(surfaceLine.ReferenceLineIntersectionWorldPoint.Y, entity.ReferenceLineIntersectionY); Assert.AreEqual(order, entity.Order); - Assert.AreEqual(0, entity.SurfaceLineEntityId); - Assert.AreEqual(0, entity.FailureMechanismEntityId); Assert.IsNull(entity.FailureMechanismEntity); IEnumerable points = new Point3D[0]; string expectedXml = new Point3DXmlSerializer().ToXml(points); @@ -142,8 +140,6 @@ string expectedXml = new Point3DXmlSerializer().ToXml(surfaceLine.Points); Assert.AreEqual(expectedXml, entity.PointsXml); - Assert.AreEqual(0, entity.SurfaceLineEntityId); - Assert.AreEqual(0, entity.FailureMechanismEntityId); Assert.IsNull(entity.FailureMechanismEntity); } @@ -279,8 +275,6 @@ CollectionAssert.Contains(characteristicPointTypeValues, (byte) PipingCharacteristicPointType.BottomDitchPolderSide); CollectionAssert.Contains(characteristicPointTypeValues, (byte) PipingCharacteristicPointType.DitchPolderSide); - Assert.AreEqual(0, entity.SurfaceLineEntityId); - Assert.AreEqual(0, entity.FailureMechanismEntityId); Assert.IsNull(entity.FailureMechanismEntity); } Index: build/DatabaseStructure.sql =================================================================== diff -u -r0641053e020a1478f793ee17e753df60af26171f -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 --- build/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision 0641053e020a1478f793ee17e753df60af26171f) +++ build/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision e08b5ce64ea11d4f631c96acf8c7bf7f33865f78) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 20-Sep-2017 9:43:01 AM */ +/* Created On : 20-Sep-2017 10:49:48 AM */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -619,9 +619,9 @@ 'MaterialName' TEXT NOT NULL, 'BelowPhreaticLevelMean' REAL, 'BelowPhreaticLevelDeviation' REAL, + 'BelowPhreaticLevelShift' REAL, 'DiameterD70Mean' REAL, 'DiameterD70CoefficientOfVariation' REAL, - 'BelowPhreaticLevelShift' REAL, 'PermeabilityMean' REAL, 'PermeabilityCoefficientOfVariation' REAL, 'Order' INT (4) NOT NULL, Index: design/DatabaseDesign.eap =================================================================== diff -u -r0641053e020a1478f793ee17e753df60af26171f -re08b5ce64ea11d4f631c96acf8c7bf7f33865f78 Binary files differ