[Dive4elements-commits] [PATCH 1 of 2] Schema change: there is only one bed height per station at a given point in time

Wald Commits scm-commit at wald.intevation.org
Thu May 16 18:04:46 CEST 2013


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1368720219 -7200
# Node ID 2d16f4a0bdccb6f55e6ce9e784a7123ece31720f
# Parent  d12f920bbf0063d28b24699493b6d222dfc46903
Schema change: there is only one bed height per station at a given point in time

diff -r d12f920bbf00 -r 2d16f4a0bdcc backend/doc/schema/oracle-minfo.sql
--- a/backend/doc/schema/oracle-minfo.sql	Thu May 16 16:14:28 2013 +0200
+++ b/backend/doc/schema/oracle-minfo.sql	Thu May 16 18:03:39 2013 +0200
@@ -92,6 +92,7 @@
     sounding_width          NUMBER(38,2),
     width                   NUMBER(38,2),
     PRIMARY KEY(id),
+    UNIQUE (station, bed_height_single_id),
     CONSTRAINT fk_bed_single_values_parent FOREIGN KEY (bed_height_single_id) REFERENCES bed_height_single(id) ON DELETE CASCADE
 );
 
diff -r d12f920bbf00 -r 2d16f4a0bdcc backend/doc/schema/postgresql-minfo.sql
--- a/backend/doc/schema/postgresql-minfo.sql	Thu May 16 16:14:28 2013 +0200
+++ b/backend/doc/schema/postgresql-minfo.sql	Thu May 16 18:03:39 2013 +0200
@@ -92,6 +92,7 @@
     sounding_width          NUMERIC,
     width                   NUMERIC,
     PRIMARY KEY(id),
+    UNIQUE (station, bed_height_single_id),
     CONSTRAINT fk_bed_single_values_parent FOREIGN KEY (bed_height_single_id) REFERENCES bed_height_single(id) ON DELETE CASCADE
 );
 


More information about the Dive4elements-commits mailing list