[Dive4elements-commits] [PATCH] Schema change: leave it up to AFT whether time intervals are unique per gauge but do not accept duplicate bfg_id per gauge

Wald Commits scm-commit at wald.intevation.org
Wed May 8 13:16:33 CEST 2013


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1368011789 -7200
# Node ID 131f5f58ff7d3491f1aa9e8312a0ed981568c18a
# Parent  8ed9b1edace62f2ca2d841890edf77d48fcb8f22
Schema change: leave it up to AFT whether time intervals are unique per gauge but do not accept duplicate bfg_id per gauge

diff -r 8ed9b1edace6 -r 131f5f58ff7d backend/doc/schema/oracle.sql
--- 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)
 );
 
 
diff -r 8ed9b1edace6 -r 131f5f58ff7d backend/doc/schema/postgresql.sql
--- 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


More information about the Dive4elements-commits mailing list