diff backend/doc/schema/postgresql-minfo.sql @ 8641:c851d1ea543a

SCHEMA CHANGE: Remove unnecessary direct relation of sq_relation with rivers.
author Tom Gottfried <tom@intevation.de>
date Fri, 27 Mar 2015 17:42:27 +0100
parents 6fcf4717605f
children 9db1f48bfea9
line wrap: on
line diff
--- a/backend/doc/schema/postgresql-minfo.sql	Fri Mar 27 17:27:08 2015 +0100
+++ b/backend/doc/schema/postgresql-minfo.sql	Fri Mar 27 17:42:27 2015 +0100
@@ -348,7 +348,7 @@
         REFERENCES sediment_load_kinds(id),
     CONSTRAINT fk_sl_grain_fraction_id FOREIGN KEY (grain_fraction_id)
         REFERENCES grain_fraction(id),
-    CONSTRAINT fk_sl_time_interval_id FOREIGN KEY (time_interval_id) 
+    CONSTRAINT fk_sl_time_interval_id FOREIGN KEY (time_interval_id)
         REFERENCES time_intervals(id),
     CONSTRAINT fk_sl_sq_time_interval_id FOREIGN KEY (sq_time_interval_id)
         REFERENCES time_intervals(id)
@@ -374,12 +374,9 @@
 
 CREATE TABLE sq_relation (
     id               int NOT NULL,
-    river_id         int NOT NULL,
     time_interval_id int NOT NULL,
     description      VARCHAR(256),
     PRIMARY KEY (id),
-    CONSTRAINT fk_sqr_river_id FOREIGN KEY (river_id)
-        REFERENCES rivers(id) ON DELETE CASCADE,
     CONSTRAINT fk_sqr_tinterval_id FOREIGN KEY (time_interval_id)
         REFERENCES time_intervals(id)
 );

http://dive4elements.wald.intevation.org