changeset 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 8ed9b1edace6
children 454b7b455cb6
files backend/doc/schema/oracle.sql backend/doc/schema/postgresql.sql
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/backend/doc/schema/oracle.sql	Wed May 08 11:42:08 2013 +0200
+++ b/backend/doc/schema/oracle.sql	Wed May 08 13:16:29 2013 +0200
@@ -97,7 +97,7 @@
     gauge_id            NUMBER(38,0) NOT NULL,
     time_interval_id    NUMBER(38,0),
     PRIMARY KEY         (id),
-    UNIQUE(gauge_id, time_interval_id, kind)
+    UNIQUE(gauge_id, bfg_id, kind)
 );
 
 
--- 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