[Dive4elements-commits] [PATCH] Schema change: add constraint to have unique stations per flow velocity model

Wald Commits scm-commit at wald.intevation.org
Mon Apr 15 16:04:25 CEST 2013


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1366034662 -7200
# Node ID e89d922df8ae6d730b02ed57682d457df2cff56a
# Parent  e8469247dc6b274371b64a407fc29ac0f2b75d06
Schema change: add constraint to have unique stations per flow velocity model

diff -r e8469247dc6b -r e89d922df8ae flys-backend/doc/schema/oracle-minfo.sql
--- a/flys-backend/doc/schema/oracle-minfo.sql	Mon Apr 15 15:48:58 2013 +0200
+++ b/flys-backend/doc/schema/oracle-minfo.sql	Mon Apr 15 16:04:22 2013 +0200
@@ -207,6 +207,7 @@
     main_channel            NUMBER(38,3) NOT NULL,
     shear_stress            NUMBER(38,3) 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
 );
 
diff -r e8469247dc6b -r e89d922df8ae flys-backend/doc/schema/postgresql-minfo.sql
--- a/flys-backend/doc/schema/postgresql-minfo.sql	Mon Apr 15 15:48:58 2013 +0200
+++ b/flys-backend/doc/schema/postgresql-minfo.sql	Mon Apr 15 16:04:22 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
 );
 


More information about the Dive4elements-commits mailing list