diff backend/doc/schema/postgresql.sql @ 5923:131f5f58ff7d

Schema change: leave it up to AFT whether time intervals are unique per gauge but do not accept duplicate bfg_id per gauge
author Tom Gottfried <tom@intevation.de>
date Wed, 08 May 2013 13:16:29 +0200
parents 4fafe8d147b2
children 6ea171b6d8d2
line wrap: on
line diff
--- a/backend/doc/schema/postgresql.sql	Wed May 08 11:42:08 2013 +0200
+++ b/backend/doc/schema/postgresql.sql	Wed May 08 13:16:29 2013 +0200
@@ -151,7 +151,7 @@
     bfg_id           VARCHAR(50),
     kind             int NOT NULL DEFAULT 0,
     time_interval_id int REFERENCES time_intervals(id),
-    UNIQUE(gauge_id, time_interval_id, kind)
+    UNIQUE(gauge_id, bfg_id, kind)
 );
 
 -- Values of the Abflusstafeln

http://dive4elements.wald.intevation.org