[PATCH] (issue1750) Apply schema changes to oracle, which are already done for PostgreSQL

Wald Commits scm-commit at wald.intevation.org
Fri Apr 24 15:06:42 CEST 2015


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1429880798 -7200
# Node ID 94cddb00f934aa449d714d1f38b9f0aa7b2b8865
# Parent  682a26e4158b4b664a6ae918a50dae3f8011fcbd
(issue1750) Apply schema changes to oracle, which are already done for PostgreSQL.

diff -r 682a26e4158b -r 94cddb00f934 backend/doc/schema/oracle-minfo.sql
--- a/backend/doc/schema/oracle-minfo.sql	Thu Apr 23 19:20:40 2015 +0200
+++ b/backend/doc/schema/oracle-minfo.sql	Fri Apr 24 15:06:38 2015 +0200
@@ -325,6 +325,7 @@
     operator                 VARCHAR2(64 CHAR),
     commentary               VARCHAR2(512 CHAR),
     PRIMARY KEY (id),
+    CHECK(measurement_type IN ('Geschiebe', 'Schwebstoff')),
     CONSTRAINT fk_ms_range_id FOREIGN KEY (range_id)
         REFERENCES ranges(id) ON DELETE CASCADE,
     CONSTRAINT fk_ms_reference_gauge_id FOREIGN KEY (reference_gauge_id)
@@ -374,11 +375,9 @@
 
 CREATE TABLE sq_relation (
     id               NUMBER(38,0) NOT NULL,
-    river_id         NUMBER(38,0) NOT NULL,
     time_interval_id NUMBER(38,0) NOT NULL,
     description      VARCHAR(256),
     PRIMARY KEY (id),
-    CONSTRAINT fk_sqr_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE,
     CONSTRAINT fk_sqr_tinterval_id FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id)
 );
 
@@ -399,6 +398,7 @@
     cferguson                NUMBER(38,20),
     cduan                    NUMBER(38,20),
     PRIMARY KEY (id),
+    UNIQUE(sq_relation_id, measurement_station_id, parameter),
     CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE,
     CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) ON DELETE CASCADE
 );


More information about the Dive4Elements-commits mailing list