changeset 7863:082284c4e0ad

Updated oracle minfo schema (added porosity).
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 08 May 2014 13:52:20 +0200
parents cdef048c4ac5
children d9d2bd78eff6
files backend/doc/schema/oracle-minfo.sql
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 (

http://dive4elements.wald.intevation.org