Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql =================================================================== diff -u -rac7fcdda3d4fc6f28d2d466055769ff03f7580fd -rfcfc245c8179a835256ae3d5fd84f35f9b8ec8aa --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision ac7fcdda3d4fc6f28d2d466055769ff03f7580fd) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision fcfc245c8179a835256ae3d5fd84f35f9b8ec8aa) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 27-Oct-2016 3:40:01 PM */ +/* Created On : 28-okt-2016 15:45:26 */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -177,6 +177,9 @@ DROP TABLE IF EXISTS 'StabilityPointStructureEntity' ; +DROP TABLE IF EXISTS 'StabilityPointStructuresCalculationEntity' +; + /* Create Tables with Primary and Foreign Keys, Check and Unique Constraints */ CREATE TABLE 'VersionEntity' @@ -1092,6 +1095,78 @@ ) ; +CREATE TABLE 'StabilityPointStructuresCalculationEntity' +( + 'StabilityPointStructuresCalculationEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + 'CalculationGroupEntityId' INTEGER NOT NULL, + 'ForeshoreProfileEntityId' INTEGER, + 'HydraulicLocationEntityId' INTEGER, + 'StabilityPointStructureEntityId' INTEGER, + 'Order' INT (4) NOT NULL, + 'Name' VARCHAR (260), + 'Comments' TEXT, + 'UseBreakWater' TINYINT (1), + 'BreakWaterType' SMALLINT NOT NULL, + 'BreakWaterHeight' REAL, + 'UseForeshore' TINYINT (1) NOT NULL, + 'StructureNormalOrientation' REAL, + 'StorageStructureAreaMean' REAL, + 'StorageStructureAreaCoefficientOfVariation' REAL, + 'AllowedLevelIncreaseStorageMean' REAL, + 'AllowedLevelIncreaseStorageStandardDeviation' REAL, + 'WidthFlowAperturesMean' REAL, + 'WidthFlowAperturesCoefficientOfVariation' REAL, + 'InsideWaterLevelMean' REAL, + 'InsideWaterLevelStandardDeviation' REAL, + 'ThresholdHeightOpenWeirMean' REAL, + 'ThresholdHeightOpenWeirStandardDeviation' REAL, + 'CriticalOvertoppingDischargeMean' REAL, + 'CriticalOvertoppingDischargeCoefficientOfVariation' REAL, + 'FlowWidthAtBottomProtectionMean' REAL, + 'FlowWidthAtBottomProtectionStandardDeviation' REAL, + 'ConstructiveStrengthLinearLoadModelMean' REAL, + 'ConstructiveStrengthLinearLoadModelCoefficientOfVariation' REAL, + 'ConstructiveStrengthQuadraticLoadModelMean' REAL, + 'ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation' REAL, + 'BankWidthMean' REAL, + 'BankWidthStandardDeviation' REAL, + 'InsideWaterLevelFailureConstructionMean' REAL, + 'InsideWaterLevelFailureConstructionStandardDeviation' REAL, + 'EvaluationLevel' REAL, + 'LevelCrestStructureMean' REAL, + 'LevelCrestStructureStandardDeviation' REAL, + 'VerticalDistance' REAL, + 'FailureProbabilityRepairClosure' REAL NOT NULL, + 'FailureCollisionEnergyMean' REAL, + 'FailureCollisionEnergyCoefficientOfVariation' REAL, + 'ShipMassMean' REAL, + 'ShipMassCoefficientOfVariation' REAL, + 'ShipVelocityMean' REAL, + 'ShipVelocityCoefficientOfVariation' REAL, + 'LevellingCount' INT (4) NOT NULL, + 'ProbabilityCollisionSecondaryStructure' REAL NOT NULL, + 'FlowVelocityStructureClosableMean' REAL, + 'FlowVelocityStructureClosableStandardDeviation' REAL, + 'StabilityLinearLoadModelMean' REAL, + 'StabilityLinearLoadModelCoefficientOfVariation' REAL, + 'StabilityQuadraticLoadModelMean' REAL, + 'StabilityQuadraticLoadModelCoefficientOfVariation' REAL, + 'AreaFlowAperturesMean' REAL, + 'AreaFlowAperturesStandardDeviation' REAL, + 'InflowModelType' TINYINT (1) NOT NULL, + 'LoadSchematizationType' TINYINT (1) NOT NULL, + 'VolumicWeightWater' REAL, + 'StormDurationMean' REAL, + 'ModelFactorSuperCriticalFlowMean' REAL, + 'FactorStormDurationOpenStructure' REAL, + 'DrainCoefficientMean' REAL, + 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 Set Null, + CONSTRAINT 'FK_StabilityPointStructuresCalculationEntity_HydraulicLocationEntity' FOREIGN KEY ('HydraulicLocationEntityId') REFERENCES 'HydraulicLocationEntity' ('HydraulicLocationEntityId') ON DELETE Set Null ON UPDATE Cascade, + CONSTRAINT 'FK_StabilityPointStructuresCalculationEntity_StabilityPointStructureEntity' FOREIGN KEY ('StabilityPointStructureEntityId') REFERENCES 'StabilityPointStructureEntity' ('StabilityPointStructureEntityId') ON DELETE Set Null ON UPDATE Set Null +) +; + /* Create Indexes and Triggers */ CREATE INDEX 'IXFK_PipingFailureMechanismMetaEntity_FailureMechanismEntity' @@ -1389,3 +1464,19 @@ CREATE INDEX 'IXFK_StabilityPointStructureEntity_FailureMechanismEntity' ON 'StabilityPointStructureEntity' ('FailureMechanismEntityId' ASC) ; + +CREATE INDEX 'IXFK_StabilityPointStructuresCalculationEntity_CalculationGroupEntity' + ON 'StabilityPointStructuresCalculationEntity' ('CalculationGroupEntityId' ASC) +; + +CREATE INDEX 'IXFK_StabilityPointStructuresCalculationEntity_ForeshoreProfileEntity' + ON 'StabilityPointStructuresCalculationEntity' ('ForeshoreProfileEntityId' ASC) +; + +CREATE INDEX 'IXFK_StabilityPointStructuresCalculationEntity_HydraulicLocationEntity' + ON 'StabilityPointStructuresCalculationEntity' ('HydraulicLocationEntityId' ASC) +; + +CREATE INDEX 'IXFK_StabilityPointStructuresCalculationEntity_StabilityPointStructureEntity' + ON 'StabilityPointStructuresCalculationEntity' ('StabilityPointStructureEntityId' ASC) +;