Index: build/DatabaseStructure.sql
===================================================================
diff -u -rf49fef750f4d3cd7091fcd44442f91e978b341b3 -r3911270a85371be92632b1aafaf1f2b523a6b729
--- build/DatabaseStructure.sql	(.../DatabaseStructure.sql)	(revision f49fef750f4d3cd7091fcd44442f91e978b341b3)
+++ build/DatabaseStructure.sql	(.../DatabaseStructure.sql)	(revision 3911270a85371be92632b1aafaf1f2b523a6b729)
@@ -1,6 +1,6 @@
 /* ---------------------------------------------------- */
 /*  Generated by Enterprise Architect Version 12.0 		*/
-/*  Created On : 09-apr-2018 10:37:44 				*/
+/*  Created On : 09-Apr-2018 13:37:29 				*/
 /*  DBMS       : SQLite 								*/
 /* ---------------------------------------------------- */
 
@@ -294,9 +294,6 @@
 DROP TABLE IF EXISTS 'HydraulicLocationCalculationEntity'
 ;
 
-DROP TABLE IF EXISTS 'HydraulicLocationCalculationCollectionToHydraulicCalculationEntity'
-;
-
 DROP TABLE IF EXISTS 'HydraulicLocationCalculationCollectionEntity'
 ;
 
@@ -1984,22 +1981,13 @@
 (
 	'HydraulicLocationCalculationEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 	'HydraulicLocationEntityId' INTEGER NOT NULL,
+	'HydraulicLocationCalculationCollectionEntityId' INTEGER NOT NULL,
 	'ShouldIllustrationPointsBeCalculated' TINYINT (1) NOT NULL, -- True or false
+	CONSTRAINT 'FK_HydraulicLocationCalculationEntity_HydraulicLocationCalculationCollectionEntity' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntityId') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE Cascade ON UPDATE Cascade,
 	CONSTRAINT 'FK_HydraulicLocationCalculationEntity_HydraulicLocationEntity' FOREIGN KEY ('HydraulicLocationEntityId') REFERENCES 'HydraulicLocationEntity' ('HydraulicLocationEntityId') ON DELETE Cascade ON UPDATE Cascade
 )
 ;
 
-CREATE TABLE 'HydraulicLocationCalculationCollectionToHydraulicCalculationEntity'
-(
-	'HydraulicLocationCalculationEntityId' INTEGER NOT NULL,
-	'HydraulicLocationCalculationCollectionEntityId' INTEGER NOT NULL,
-	CONSTRAINT 'PK_HydraulicLocationCalculationCollectionToHydraulicCalculationEntity' PRIMARY KEY ('HydraulicLocationCalculationEntityId','HydraulicLocationCalculationCollectionEntityId'),
-	CONSTRAINT 'FK_HydraulicLocationCalculationCollectionToHydraulicCalculationEntity_HydraulicLocationCalculationCollectionEntity' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntityId') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE Cascade ON UPDATE Cascade,
-	CONSTRAINT 'FK_HydraulicLocationCalculationCollectionToHydraulicCalculationEntity_HydraulicLocationCalculationEntity' FOREIGN KEY ('HydraulicLocationCalculationEntityId') REFERENCES 'HydraulicLocationCalculationEntity' ('HydraulicLocationCalculationEntityId') ON DELETE Cascade ON UPDATE Cascade,
-	CONSTRAINT 'U_HydraulicLocationCalculationEntityId' UNIQUE ('HydraulicLocationCalculationEntityId')
-)
-;
-
 CREATE TABLE 'HydraulicLocationCalculationCollectionEntity'
 (
 	'HydraulicLocationCalculationCollectionEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT
@@ -2768,24 +2756,10 @@
  ON 'HydraRingPreprocessorEntity' ('AssessmentSectionEntityId' ASC)
 ;
 
+CREATE INDEX 'IXFK_HydraulicLocationCalculationEntity_HydraulicLocationCalculationCollectionEntity'
+ ON 'HydraulicLocationCalculationEntity' ('HydraulicLocationCalculationCollectionEntityId' ASC)
+;
+
 CREATE INDEX 'IXFK_HydraulicLocationCalculationEntity_HydraulicLocationEntity'
  ON 'HydraulicLocationCalculationEntity' ('HydraulicLocationEntityId' ASC)
 ;
-
-CREATE INDEX 'IXFK_HydraulicLocationCalculationCollectionToHydraulicCalculationEntity_HydraulicLocationCalculationCollectionEntity'
- ON 'HydraulicLocationCalculationCollectionToHydraulicCalculationEntity' ('HydraulicLocationCalculationCollectionEntityId' ASC)
-;
-
-CREATE INDEX 'IXFK_HydraulicLocationCalculationCollectionToHydraulicCalculationEntity_HydraulicLocationCalculationEntity'
- ON 'HydraulicLocationCalculationCollectionToHydraulicCalculationEntity' ('HydraulicLocationCalculationEntityId' ASC)
-;
-CREATE TRIGGER [TR_AfterDeleteHydraulicLocationCalculationCollectionEntity_RemoveHydraulicLocationCalculationEntities]
-	AFTER DELETE
-	ON HydraulicLocationCalculationCollectionEntity
-	FOR EACH ROW
-BEGIN
-	DELETE 
-	FROM HydraulicLocationCalculationEntity
-	WHERE HydraulicLocationCalculationEntityId IS OLD.HydraulicLocationCalculationEntityId;
-END; 
-;
