diff flys-backend/doc/schema/postgresql-minfo.sql @ 5777:e95427ed80e5

Merged
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 21 Apr 2013 10:46:59 +0200
parents e89d922df8ae
children
line wrap: on
line diff
--- a/flys-backend/doc/schema/postgresql-minfo.sql	Sun Apr 21 10:46:06 2013 +0200
+++ b/flys-backend/doc/schema/postgresql-minfo.sql	Sun Apr 21 10:46:59 2013 +0200
@@ -207,6 +207,7 @@
     main_channel            NUMERIC NOT NULL,
     shear_stress            NUMERIC NOT NULL,
     PRIMARY KEY(id),
+    UNIQUE (station, flow_velocity_model_id),
     CONSTRAINT fk_fvv_flow_velocity_model_id FOREIGN KEY (flow_velocity_model_id) REFERENCES flow_velocity_model(id) ON DELETE CASCADE
 );
 
@@ -331,6 +332,6 @@
     cduan                  NUMERIC,
     PRIMARY KEY (id),
     CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE,
-    CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id)
+    CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) ON DELETE CASCADE
 );
 COMMIT;

http://dive4elements.wald.intevation.org