Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj =================================================================== diff -u -r97b58f8b45f452db1d9703468a59bd67cde46f1a -rb809769cd89b011d6746bf0b9b99eff1abd49f60 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 97b58f8b45f452db1d9703468a59bd67cde46f1a) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision b809769cd89b011d6746bf0b9b99eff1abd49f60) @@ -63,6 +63,12 @@ + + RingtoetsEntities.tt + + + RingtoetsEntities.tt + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql =================================================================== diff -u -rb288b314730add5972e45c79e54ea18a4972eb90 -rb809769cd89b011d6746bf0b9b99eff1abd49f60 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision b288b314730add5972e45c79e54ea18a4972eb90) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision b809769cd89b011d6746bf0b9b99eff1abd49f60) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 21-apr-2016 15:29:00 */ +/* Created On : 29-apr-2016 13:25:01 */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -18,6 +18,12 @@ DROP TABLE IF EXISTS 'FailureMechanismEntity' ; +DROP TABLE IF EXISTS 'FailureMechanismSectionEntity' +; + +DROP TABLE IF EXISTS 'FailureMechanismSectionPointEntity' +; + DROP TABLE IF EXISTS 'HydraulicLocationEntity' ; @@ -72,13 +78,33 @@ ( 'FailureMechanismEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'AssessmentSectionEntityId' INTEGER NOT NULL, - 'FailureMechanismType' SMALLINT NOT NULL, -- Enumerator for different failure mechanism types (piping, macrostability, dunes, etc) + 'FailureMechanismType' SMALLINT NOT NULL, -- Enumerator for different failure mechanism types (piping, macrostability, dunes, etc) 1 = Piping 2 = Macrostabiliteit binnenwaarts 3= Golfklappen op asfaltbekleding 4= Grasbekleding erosie buitentalud 5 = Grasbekleding afschuiven buitentalud 6 = Grasbekleding erosie kruin en binnentalud 7 = Stabiliteit steenzetting 8 = Duinafslag 9 = Hoogte kunstwerk 10 = Betrouwbaarheid sluiten kunstwerk 11 = Piping bij kunstwerk 12 = Sterkte en stabiliteit puntconstructires 13 = Macrostabiliteit buitenwaarts 14 = Microstabiliteit 15 = Wateroverdruk bij asfaltbekleding 16 = Grasbekleding afschuiven binnentalud 17 = Sterkte en stabiliteit langsconstructires 18 = Technische innovaties 'IsRelevant' TINYINT (1) NOT NULL, -- true or false CONSTRAINT 'FK_FailureMechanismEntity_AssessmentSectionEntity' FOREIGN KEY ('AssessmentSectionEntityId') REFERENCES 'AssessmentSectionEntity' ('AssessmentSectionEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'UI_AssessmentSectionEntityId_FailureMechanismType' UNIQUE ('FailureMechanismType','AssessmentSectionEntityId') ) ; +CREATE TABLE 'FailureMechanismSectionEntity' +( + 'FailureMechanismSectionEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + 'FailureMechanismEntityId' INTEGER NOT NULL, + 'Name' VARCHAR (255) NOT NULL, + CONSTRAINT 'FK_FailureMechanismSectionEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade +) +; + +CREATE TABLE 'FailureMechanismSectionPointEntity' +( + 'FailureMechanismSectionPointEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + 'FailureMechanismSectionEntityId' INTEGER NOT NULL, + 'X' NUMERIC NOT NULL, + 'Y' NUMERIC NOT NULL, + 'Order' INTEGER NOT NULL, + CONSTRAINT 'FK_FailureMechanismSectionPointEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade +) +; + CREATE TABLE 'HydraulicLocationEntity' ( 'HydraulicLocationEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, @@ -121,16 +147,6 @@ ) ; -CREATE TABLE 'StochasticSoilModelEntity' -( - 'StochasticSoilModelEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - 'FailureMechanismEntityId' INTEGER NOT NULL, - 'Name' TEXT NOT NULL, - 'SegmentName' TEXT NOT NULL, - CONSTRAINT 'FK_StochasticSoilModelEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade -) -; - CREATE TABLE 'StochasticSoilProfileEntity' ( 'StochasticSoilProfileEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, @@ -142,6 +158,16 @@ ) ; +CREATE TABLE 'StochasticSoilModelEntity' +( + 'StochasticSoilModelEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + 'FailureMechanismEntityId' INTEGER NOT NULL, + 'Name' TEXT NOT NULL, + 'SegmentName' TEXT NOT NULL, + CONSTRAINT 'FK_StochasticSoilModelEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade +) +; + /* Create Indexes and Triggers */ CREATE INDEX 'IXFK_AssessmentSectionEntity_ProjectEntity' @@ -152,6 +178,14 @@ ON 'FailureMechanismEntity' ('AssessmentSectionEntityId' ASC) ; +CREATE INDEX 'IXFK_FailureMechanismSectionEntity_FailureMechanismEntity' + ON 'FailureMechanismSectionEntity' ('FailureMechanismEntityId' ASC) +; + +CREATE INDEX 'IXFK_FailureMechanismSectionPointEntity_FailureMechanismSectionEntity' + ON 'FailureMechanismSectionPointEntity' ('FailureMechanismSectionEntityId' ASC) +; + CREATE INDEX 'IXFK_HydraulicLocationEntity_AssessmentSectionEntity' ON 'HydraulicLocationEntity' ('AssessmentSectionEntityId' ASC) ; @@ -160,14 +194,14 @@ ON 'ReferenceLinePointEntity' ('AssessmentSectionEntityId' ASC) ; -CREATE INDEX 'IXFK_StochasticSoilModelEntity_FailureMechanismEntity' - ON 'StochasticSoilModelEntity' ('FailureMechanismEntityId' ASC) -; - CREATE INDEX 'IXFK_StochasticSoilProfileEntity_SoilProfileEntity' ON 'StochasticSoilProfileEntity' ('SoilProfileEntityId' ASC) ; CREATE INDEX 'IXFK_StochasticSoilProfileEntity_StochasticSoilModelEntity' ON 'StochasticSoilProfileEntity' ('StochasticSoilModelEntityId' ASC) ; + +CREATE INDEX 'IXFK_StochasticSoilModelEntity_FailureMechanismEntity' + ON 'StochasticSoilModelEntity' ('FailureMechanismEntityId' ASC) +; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs =================================================================== diff -u -r6d514ec60f68620d78015ac58ba6a966ef6b14e3 -rb809769cd89b011d6746bf0b9b99eff1abd49f60 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs (.../FailureMechanismEntity.cs) (revision 6d514ec60f68620d78015ac58ba6a966ef6b14e3) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs (.../FailureMechanismEntity.cs) (revision b809769cd89b011d6746bf0b9b99eff1abd49f60) @@ -38,6 +38,7 @@ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public FailureMechanismEntity() { + this.FailureMechanismSectionEntities = new HashSet(); this.StochasticSoilModelEntities = new HashSet(); } @@ -48,6 +49,8 @@ public virtual AssessmentSectionEntity AssessmentSectionEntity { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection FailureMechanismSectionEntities { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StochasticSoilModelEntities { get; set; } } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionEntity.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionEntity.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionEntity.cs (revision b809769cd89b011d6746bf0b9b99eff1abd49f60) @@ -0,0 +1,52 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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. + +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Application.Ringtoets.Storage.DbContext +{ + using System; + using System.Collections.Generic; + + public partial class FailureMechanismSectionEntity + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public FailureMechanismSectionEntity() + { + this.FailureMechanismSectionPointEntities = new HashSet(); + } + + public long FailureMechanismSectionEntityId { get; set; } + public long FailureMechanismEntityId { get; set; } + public string Name { get; set; } + + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection FailureMechanismSectionPointEntities { get; set; } + } +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionPointEntity.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionPointEntity.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionPointEntity.cs (revision b809769cd89b011d6746bf0b9b99eff1abd49f60) @@ -0,0 +1,46 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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. + +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Application.Ringtoets.Storage.DbContext +{ + using System; + using System.Collections.Generic; + + public partial class FailureMechanismSectionPointEntity + { + public long FailureMechanismSectionPointEntityId { get; set; } + public long FailureMechanismSectionEntityId { get; set; } + public decimal X { get; set; } + public decimal Y { get; set; } + public long Order { get; set; } + + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } + } +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Context.cs =================================================================== diff -u -r4e14ed090d09a220a790b3562ceb4232dab1cce6 -rb809769cd89b011d6746bf0b9b99eff1abd49f60 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Context.cs (.../RingtoetsEntities.Context.cs) (revision 4e14ed090d09a220a790b3562ceb4232dab1cce6) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Context.cs (.../RingtoetsEntities.Context.cs) (revision b809769cd89b011d6746bf0b9b99eff1abd49f60) @@ -54,6 +54,8 @@ public virtual DbSet AssessmentSectionEntities { get; set; } public virtual DbSet FailureMechanismEntities { get; set; } + public virtual DbSet FailureMechanismSectionEntities { get; set; } + public virtual DbSet FailureMechanismSectionPointEntities { get; set; } public virtual DbSet HydraulicLocationEntities { get; set; } public virtual DbSet ProjectEntities { get; set; } public virtual DbSet ReferenceLinePointEntities { get; set; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx =================================================================== diff -u -r6d514ec60f68620d78015ac58ba6a966ef6b14e3 -rb809769cd89b011d6746bf0b9b99eff1abd49f60 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision 6d514ec60f68620d78015ac58ba6a966ef6b14e3) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision b809769cd89b011d6746bf0b9b99eff1abd49f60) @@ -27,6 +27,24 @@ + + + + + + + + + + + + + + + + + + @@ -124,6 +142,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -199,6 +241,8 @@ + + @@ -215,6 +259,14 @@ + + + + + + + + @@ -247,6 +299,8 @@ + + @@ -271,10 +325,18 @@ + + + + + + + + @@ -314,8 +376,30 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -447,6 +531,18 @@ + + + + + + + + + + + + @@ -459,6 +555,18 @@ + + + + + + + + + + + + @@ -525,6 +633,26 @@ + + + + + + + + + + + + + + + + + + + + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram =================================================================== diff -u -r6d514ec60f68620d78015ac58ba6a966ef6b14e3 -rb809769cd89b011d6746bf0b9b99eff1abd49f60 --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision 6d514ec60f68620d78015ac58ba6a966ef6b14e3) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision b809769cd89b011d6746bf0b9b99eff1abd49f60) @@ -5,21 +5,25 @@ - - - - - - - - - + + + + + + + + + + + + +