[PATCH] SCHEMA CHANGE: Removed bed height epochs

Wald Commits scm-commit at wald.intevation.org
Tue Jun 10 15:12:02 CEST 2014


# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1402405896 -7200
# Node ID a88e308567a12029ed104e9311804c8317bf1ae6
# Parent  21d320ebb50c497a7afb1c99760212ee0a98e866
SCHEMA CHANGE: Removed bed height epochs.

diff -r 21d320ebb50c -r a88e308567a1 backend/doc/schema/oracle-minfo.sql
--- a/backend/doc/schema/oracle-minfo.sql	Tue Jun 10 12:51:08 2014 +0200
+++ b/backend/doc/schema/oracle-minfo.sql	Tue Jun 10 15:11:36 2014 +0200
@@ -59,27 +59,6 @@
 );
 
 
-CREATE SEQUENCE BED_HEIGHT_EPOCH_ID_SEQ;
-
-CREATE TABLE bed_height_epoch (
-    id                      NUMBER(38,0) NOT NULL,
-    river_id                NUMBER(38,0) NOT NULL,
-    time_interval_id        NUMBER(38,0) NOT NULL,
-    -- sounding_with           NUMBER(38,0) NOT NULL,
-    -- type_id                 NUMBER(38,0) NOT NULL,
-    cur_elevation_model_id  NUMBER(38,0) NOT NULL,
-    old_elevation_model_id  NUMBER(38,0),
-    range_id                NUMBER(38,0),
-    evaluation_by           VARCHAR(255),
-    description             VARCHAR(255),
-    PRIMARY KEY(id),
-    CONSTRAINT fk_time_interval FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id),
-    CONSTRAINT fk_epoch_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id),
-    CONSTRAINT fk_epoch_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id),
-    CONSTRAINT fk_epoch_range FOREIGN KEY (range_id) REFERENCES ranges(id) ON DELETE CASCADE
-);
-
-
 CREATE SEQUENCE BED_SINGLE_VALUES_ID_SEQ;
 
 CREATE TABLE bed_height_single_values (
@@ -97,18 +76,6 @@
 );
 
 
-CREATE SEQUENCE BED_EPOCH_VALUES_ID_SEQ;
-
-CREATE TABLE bed_height_epoch_values (
-    id                      NUMBER(38,0) NOT NULL,
-    bed_height_epoch_id     NUMBER(38,0) NOT NULL,
-    station                 NUMBER(38,2) NOT NULL,
-    height                  NUMBER(38,2),
-    PRIMARY KEY(id),
-    CONSTRAINT fk_bed_epoch_values_parent FOREIGN KEY (bed_height_epoch_id) REFERENCES bed_height_epoch(id) ON DELETE CASCADE
-);
-
-
 CREATE SEQUENCE DEPTHS_ID_SEQ;
 
 CREATE TABLE depths (
diff -r 21d320ebb50c -r a88e308567a1 backend/doc/schema/postgresql-minfo.sql
--- a/backend/doc/schema/postgresql-minfo.sql	Tue Jun 10 12:51:08 2014 +0200
+++ b/backend/doc/schema/postgresql-minfo.sql	Tue Jun 10 15:11:36 2014 +0200
@@ -59,27 +59,6 @@
 );
 
 
-CREATE SEQUENCE BED_HEIGHT_EPOCH_ID_SEQ;
-
-CREATE TABLE bed_height_epoch (
-    id                      int NOT NULL,
-    river_id                int NOT NULL,
-    time_interval_id        int NOT NULL,
-    -- sounding_width           int,
-    -- type_id                 int NOT NULL,
-    cur_elevation_model_id  int NOT NULL,
-    old_elevation_model_id  int,
-    range_id                int,
-    evaluation_by           VARCHAR(255),
-    description             VARCHAR(255),
-    PRIMARY KEY(id),
-    CONSTRAINT fk_time_interval FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id),
-    CONSTRAINT fk_epoch_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id),
-    CONSTRAINT fk_epoch_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id),
-    CONSTRAINT fk_epoch_range FOREIGN KEY (range_id) REFERENCES ranges(id) ON DELETE CASCADE
-);
-
-
 CREATE SEQUENCE BED_SINGLE_VALUES_ID_SEQ;
 
 CREATE TABLE bed_height_single_values (
@@ -97,18 +76,6 @@
 );
 
 
-CREATE SEQUENCE BED_EPOCH_VALUES_ID_SEQ;
-
-CREATE TABLE bed_height_epoch_values (
-    id                      int NOT NULL,
-    bed_height_epoch_id     int NOT NULL,
-    station                 NUMERIC NOT NULL,
-    height                  NUMERIC,
-    PRIMARY KEY(id),
-    CONSTRAINT fk_bed_epoch_values_parent FOREIGN KEY (bed_height_epoch_id) REFERENCES bed_height_epoch(id) ON DELETE CASCADE
-);
-
-
 CREATE SEQUENCE DEPTHS_ID_SEQ;
 
 CREATE TABLE depths (


More information about the Dive4Elements-commits mailing list