Index: build/DatabaseStructure.sql
===================================================================
diff -u -r18acfd1d6bc45059138f0c2f29c2ff7dae79cde1 -r4531d6bdddb5b8269c1115d8e8656f63a6e2ea72
--- build/DatabaseStructure.sql	(.../DatabaseStructure.sql)	(revision 18acfd1d6bc45059138f0c2f29c2ff7dae79cde1)
+++ build/DatabaseStructure.sql	(.../DatabaseStructure.sql)	(revision 4531d6bdddb5b8269c1115d8e8656f63a6e2ea72)
@@ -1,6 +1,6 @@
 /* ---------------------------------------------------- */
 /*  Generated by Enterprise Architect Version 14.1 		*/
-/*  Created On : 28-okt-2021 08:02:27 				*/
+/*  Created On : 28-sep-2021 09:27:57 				*/
 /*  DBMS       : SQLite 								*/
 /* ---------------------------------------------------- */
 
@@ -30,10 +30,10 @@
 DROP TABLE IF EXISTS 'HydraulicLocationEntity'
 ;
 
-DROP TABLE IF EXISTS 'SemiProbabilisticPipingCalculationEntity'
+DROP TABLE IF EXISTS 'GrassCoverErosionInwardsFailureMechanismMetaEntity'
 ;
 
-DROP TABLE IF EXISTS 'GrassCoverErosionInwardsFailureMechanismMetaEntity'
+DROP TABLE IF EXISTS 'SemiProbabilisticPipingCalculationEntity'
 ;
 
 DROP TABLE IF EXISTS 'GrassCoverErosionInwardsCalculationEntity'
@@ -102,9 +102,6 @@
 DROP TABLE IF EXISTS 'DuneLocationEntity'
 ;
 
-DROP TABLE IF EXISTS 'FailureMechanismFailureMechanismSectionEntity'
-;
-
 DROP TABLE IF EXISTS 'FaultTreeIllustrationPointEntity'
 ;
 
@@ -261,12 +258,6 @@
 DROP TABLE IF EXISTS 'SemiProbabilisticPipingCalculationOutputEntity'
 ;
 
-DROP TABLE IF EXISTS 'SpecificFailurePathEntity'
-;
-
-DROP TABLE IF EXISTS 'SpecificFailurePathFailureMechanismSectionEntity'
-;
-
 DROP TABLE IF EXISTS 'StabilityPointStructureEntity'
 ;
 
@@ -388,9 +379,10 @@
 CREATE TABLE 'FailureMechanismSectionEntity'
 (
 	'FailureMechanismSectionEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+	'FailureMechanismEntityId' INTEGER NOT NULL,
 	'Name' VARCHAR (260) NOT NULL,
 	'FailureMechanismSectionPointXml' TEXT NOT NULL,
-	CONSTRAINT 'FK_FailureMechanismSectionEntity_FailureMechanismEntity' FOREIGN KEY () REFERENCES  () ON DELETE Cascade ON UPDATE Cascade
+	CONSTRAINT 'FK_FailureMechanismSectionEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade
 )
 ;
 
@@ -428,6 +420,16 @@
 )
 ;
 
+CREATE TABLE 'GrassCoverErosionInwardsFailureMechanismMetaEntity'
+(
+	'GrassCoverErosionInwardsFailureMechanismMetaEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+	'FailureMechanismEntityId' INTEGER NOT NULL,
+	'N' REAL NOT NULL,
+	'DikeProfileCollectionSourcePath' TEXT NULL,
+	CONSTRAINT 'FK_GrassCoverErosionInwardsFailureMechanismMetaEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade
+)
+;
+
 CREATE TABLE 'SemiProbabilisticPipingCalculationEntity'
 (
 	'SemiProbabilisticPipingCalculationEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
@@ -455,16 +457,6 @@
 )
 ;
 
-CREATE TABLE 'GrassCoverErosionInwardsFailureMechanismMetaEntity'
-(
-	'GrassCoverErosionInwardsFailureMechanismMetaEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
-	'FailureMechanismEntityId' INTEGER NOT NULL,
-	'N' REAL NOT NULL,
-	'DikeProfileCollectionSourcePath' TEXT NULL,
-	CONSTRAINT 'FK_GrassCoverErosionInwardsFailureMechanismMetaEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade
-)
-;
-
 CREATE TABLE 'GrassCoverErosionInwardsCalculationEntity'
 (
 	'GrassCoverErosionInwardsCalculationEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
@@ -839,16 +831,6 @@
 )
 ;
 
-CREATE TABLE 'FailureMechanismFailureMechanismSectionEntity'
-(
-	'FailureMechanismEntityId' INTEGER NOT NULL,
-	'FailureMechanismSectionEntityId' INTEGER NOT NULL,
-	CONSTRAINT 'PK_FailureMechanismFailureMechanismSectionEntity' PRIMARY KEY ('FailureMechanismSectionEntityId','FailureMechanismEntityId'),
-	CONSTRAINT 'FK_FailureMechanismFailureMechanismSectionEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade,
-	CONSTRAINT 'FK_FailureMechanismFailureMechanismSectionEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade
-)
-;
-
 CREATE TABLE 'FaultTreeIllustrationPointEntity'
 (
 	'FaultTreeIllustrationPointEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
@@ -1710,29 +1692,6 @@
 )
 ;
 
-CREATE TABLE 'SpecificFailurePathEntity'
-(
-	'SpecificFailurePathEntityId' INTEGER NOT NULL PRIMARY KEY,
-	'AssessmentSectionEntityId' INTEGER NOT NULL,
-	'IsRelevant' TINYINT (1) NOT NULL,
-	'FailureMechanismSectionCollectionSourcePath' TEXT NULL,
-	'InputComments' TEXT NULL,
-	'OutputComments' TEXT NULL,
-	'NotRelevantComments' TEXT NULL,
-	CONSTRAINT 'FK_SpecificFailurePathEntity_AssessmentSectionEntity' FOREIGN KEY ('AssessmentSectionEntityId') REFERENCES 'AssessmentSectionEntity' ('AssessmentSectionEntityId') ON DELETE No Action ON UPDATE No Action
-)
-;
-
-CREATE TABLE 'SpecificFailurePathFailureMechanismSectionEntity'
-(
-	'SpecificFailurePathEntityId' INTEGER NOT NULL,
-	'FailureMechanismSectionEntityId' INTEGER NOT NULL,
-	CONSTRAINT 'PK_SpecificFailurePathFailureMechanismSectionEntity' PRIMARY KEY ('SpecificFailurePathEntityId','FailureMechanismSectionEntityId'),
-	CONSTRAINT 'FK_SpecificFailurePathFailureMechanismSectionEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade,
-	CONSTRAINT 'FK_SpecificFailurePathFailureMechanismSectionEntity_SpecificFailurePathEntity' FOREIGN KEY ('SpecificFailurePathEntityId') REFERENCES 'SpecificFailurePathEntity' ('SpecificFailurePathEntityId') ON DELETE Cascade ON UPDATE Cascade
-)
-;
-
 CREATE TABLE 'StabilityPointStructureEntity'
 (
 	'StabilityPointStructureEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
@@ -2174,7 +2133,7 @@
 ;
 
 CREATE INDEX 'IXFK_FailureMechanismSectionEntity_FailureMechanismEntity'
- ON 'FailureMechanismSectionEntity' ()
+ ON 'FailureMechanismSectionEntity' ('FailureMechanismEntityId' ASC)
 ;
 
 CREATE INDEX 'IXFK_ClosingStructuresFailureMechanismMetaEntity_FailureMechanismEntity'
@@ -2189,6 +2148,10 @@
  ON 'HydraulicLocationEntity' ('AssessmentSectionEntityId' ASC)
 ;
 
+CREATE INDEX 'IXFK_GrassCoverErosionInwardsFailureMechanismMetaEntity_FailureMechanismEntity'
+ ON 'GrassCoverErosionInwardsFailureMechanismMetaEntity' ('FailureMechanismEntityId' ASC)
+;
+
 CREATE INDEX 'IXFK_SemiProbabilisticPipingCalculationEntity_PipingStochasticSoilProfileEntity'
  ON 'SemiProbabilisticPipingCalculationEntity' ('PipingStochasticSoilProfileEntityId' ASC)
 ;
@@ -2205,10 +2168,6 @@
  ON 'SemiProbabilisticPipingCalculationEntity' ('CalculationGroupEntityId' ASC)
 ;
 
-CREATE INDEX 'IXFK_GrassCoverErosionInwardsFailureMechanismMetaEntity_FailureMechanismEntity'
- ON 'GrassCoverErosionInwardsFailureMechanismMetaEntity' ('FailureMechanismEntityId' ASC)
-;
-
 CREATE INDEX 'IXFK_GrassCoverErosionInwardsCalculationEntity_CalculationGroupEntity'
  ON 'GrassCoverErosionInwardsCalculationEntity' ('CalculationGroupEntityId' ASC)
 ;
@@ -2328,25 +2287,6 @@
  ON 'DuneLocationEntity' ('FailureMechanismEntityId' ASC)
 ;
 
-CREATE INDEX 'IXFK_FailureMechanismFailureMechanismSectionEntity_FailureMechanismEntity'
- ON 'FailureMechanismFailureMechanismSectionEntity' ('FailureMechanismEntityId' ASC)
-;
-
-CREATE INDEX 'IXFK_FailureMechanismFailureMechanismSectionEntity_FailureMechanismSectionEntity'
- ON 'FailureMechanismFailureMechanismSectionEntity' ('FailureMechanismSectionEntityId' ASC)
-;
-CREATE TRIGGER [TR_AfterDeleteFailureMechanismEntity_RemoveFailureMechanismSectionEntityId]
-	AFTER DELETE
-	ON FailureMechanismEntity
-	FOR EACH ROW
-BEGIN
-	DELETE 
-	FROM FailureMechanismSectionEntity
-	WHERE OLD.FailureMechanismSectionEntityId IS NOT NULL 
-	AND FailureMechanismSectionEntityId IS OLD.FailureMechanismSectionEntityId;
-END; 
-;
-
 CREATE INDEX 'IXFK_FaultTreeIllustrationPoint_FaultTreeIllustrationPoint'
  ON 'FaultTreeIllustrationPointEntity' ('ParentFaultTreeIllustrationPointEntityId' ASC)
 ;
@@ -2791,21 +2731,6 @@
  ON 'SemiProbabilisticPipingCalculationOutputEntity' ('SemiProbabilisticPipingCalculationEntityId' ASC)
 ;
 
-CREATE INDEX 'IXFK_SpecificFailurePathFailureMechanismSectionEntity_FailureMechanismSectionEntity'
- ON 'SpecificFailurePathFailureMechanismSectionEntity' ('FailureMechanismSectionEntityId' ASC)
-;
-CREATE TRIGGER [TR_AfterDeleteSpecificFailurePathEntity_RemoveFailureMechanismSectionEntityId]
-	AFTER DELETE
-	ON SpecificFailurePathEntity
-	FOR EACH ROW
-BEGIN
-	DELETE 
-	FROM FailureMechanismSectionEntity
-	WHERE OLD.FailureMechanismSectionEntityId IS NOT NULL 
-	AND FailureMechanismSectionEntityId IS OLD.FailureMechanismSectionEntityId;
-END; 
-;
-
 CREATE INDEX 'IXFK_StabilityPointStructureEntity_FailureMechanismEntity'
  ON 'StabilityPointStructureEntity' ('FailureMechanismEntityId' ASC)
 ;
