[PATCH 4 of 5] Updated oracle minfo schema (added porosity)

Wald Commits scm-commit at wald.intevation.org
Thu May 8 13:52:57 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1399549940 -7200
# Node ID 082284c4e0adf10955ce40e76877dd19c1a088ac
# Parent  cdef048c4ac5b38645e1f8a198e98c9f59d155b2
Updated oracle minfo schema (added porosity).

diff -r cdef048c4ac5 -r 082284c4e0ad backend/doc/schema/oracle-minfo.sql
--- a/backend/doc/schema/oracle-minfo.sql	Thu May 08 13:48:45 2014 +0200
+++ b/backend/doc/schema/oracle-minfo.sql	Thu May 08 13:52:20 2014 +0200
@@ -147,6 +147,35 @@
 );
 
 
+CREATE SEQUENCE POROSITY_ID_SEQ;
+
+CREATE TABLE porosity (
+    id               NUMBER NOT NULL,
+    river_id         NUMBER NOT NULL,
+    depth_id         NUMBER NOT NULL,
+    description      VARCHAR(256),
+    time_interval_id NUMBER NOT NULL,
+    PRIMARY KEY(id),
+    CONSTRAINT fk_p_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE,
+    CONSTRAINT fk_p_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id),
+    CONSTRAINT fk_p_time_interval_id FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id)
+);
+
+
+CREATE SEQUENCE POROSITY_VALUES_ID_SEQ;
+
+CREATE TABLE porosity_values (
+    id                  NUMBER NOT NULL,
+    porosity_id         NUMBER NOT NULL,
+    station             NUMBER NOT NULL,
+    shore_offset        NUMBER,
+    porosity            NUMBER NOT NULL,
+    description         VARCHAR(256),
+    PRIMARY KEY(id),
+    CONSTRAINT fk_pv_porosity_id FOREIGN KEY(porosity_id) REFERENCES porosity(id) ON DELETE CASCADE
+);
+
+
 CREATE SEQUENCE MORPHOLOGIC_WIDTH_ID_SEQ;
 
 CREATE TABLE morphologic_width (


More information about the Dive4Elements-commits mailing list