changeset 8021:4ec43afaa263

Merged
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 09 Jul 2014 16:03:04 +0200
parents 139b057a39dd (current diff) aa8dcf7331a8 (diff)
children b5cba2690347
files
diffstat 3 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/backend/doc/schema/oracle-drop-minfo.sql	Wed Jul 09 16:01:48 2014 +0200
+++ b/backend/doc/schema/oracle-drop-minfo.sql	Wed Jul 09 16:03:04 2014 +0200
@@ -27,6 +27,12 @@
 ALTER TABLE sediment_yield DROP CONSTRAINT fk_sy_time_interval_id;
 ALTER TABLE sediment_yield DROP CONSTRAINT fk_sy_river_id;
 ALTER TABLE sediment_yield_values DROP CONSTRAINT fk_syv_sediment_yield_id;
+ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_kind_id;
+ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_grain_fraction_id;
+ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_time_interval_id;
+ALTER TABLE sediment_load DROP CONSTRAINT fk_sl_sq_time_interval_id;
+ALTER TABLE sediment_load_values DROP CONSTRAINT fk_slv_sediment_load_id;
+ALTER TABLE sediment_load_values DROP CONSTRAINT fk_slv_m_station_id;
 ALTER TABLE sq_relation DROP CONSTRAINT fk_sqr_tinterval_id;
 ALTER TABLE sq_relation DROP CONSTRAINT fk_sqr_river_id;
 ALTER TABLE sq_relation_value DROP CONSTRAINT fk_sqr_id;
@@ -56,6 +62,8 @@
 DROP TABLE grain_fraction PURGE;
 DROP TABLE sediment_yield PURGE;
 DROP TABLE sediment_yield_values PURGE;
+DROP TABLE sediment_load PURGE;
+DROP TABLE sediment_load_values PURGE;
 DROP TABLE measurement_station PURGE;
 DROP TABLE sq_relation_value PURGE;
 DROP TABLE sq_relation PURGE;
@@ -79,6 +87,8 @@
 DROP SEQUENCE GRAIN_FRACTION_ID_SEQ;
 DROP SEQUENCE SEDIMENT_YIELD_ID_SEQ;
 DROP SEQUENCE SEDIMENT_YIELD_VALUES_ID_SEQ;
+DROP SEQUENCE SEDIMENT_LOAD_ID_SEQ;
+DROP SEQUENCE SEDIMENT_LOAD_VALUES_ID_SEQ;
 DROP SEQUENCE MEASUREMENT_STATION_ID_SEQ;
 DROP SEQUENCE SQ_RELATION_ID_SEQ;
 DROP SEQUENCE SQ_RELATION_VALUES_ID_SEQ;
--- a/backend/doc/schema/oracle-minfo.sql	Wed Jul 09 16:01:48 2014 +0200
+++ b/backend/doc/schema/oracle-minfo.sql	Wed Jul 09 16:03:04 2014 +0200
@@ -310,7 +310,7 @@
 
 CREATE SEQUENCE SEDIMENT_LOAD_ID_SEQ;
 
-CREATE TABLE sediment_loads (
+CREATE TABLE sediment_load (
     id                    int NOT NULL,
     grain_fraction_id     int NOT NULL,
     time_interval_id      int NOT NULL,
@@ -338,7 +338,7 @@
     value                   DOUBLE PRECISION NOT NULL,
     PRIMARY KEY (id),
     CONSTRAINT fk_slv_sediment_load_id FOREIGN KEY (sediment_load_id)
-        REFERENCES sediment_loads(id) ON DELETE CASCADE,
+        REFERENCES sediment_load(id) ON DELETE CASCADE,
     CONSTRAINT fk_slv_m_station_id FOREIGN KEY (measurement_station_id)
         REFERENCES measurement_station(id) ON DELETE CASCADE
 );
--- a/backend/doc/schema/postgresql-minfo.sql	Wed Jul 09 16:01:48 2014 +0200
+++ b/backend/doc/schema/postgresql-minfo.sql	Wed Jul 09 16:03:04 2014 +0200
@@ -311,7 +311,7 @@
 
 CREATE SEQUENCE SEDIMENT_LOAD_ID_SEQ;
 
-CREATE TABLE sediment_loads (
+CREATE TABLE sediment_load (
     id                    int NOT NULL,
     grain_fraction_id     int NOT NULL,
     time_interval_id      int NOT NULL,
@@ -339,7 +339,7 @@
     value                   DOUBLE PRECISION NOT NULL,
     PRIMARY KEY (id),
     CONSTRAINT fk_slv_sediment_load_id FOREIGN KEY (sediment_load_id)
-        REFERENCES sediment_loads(id) ON DELETE CASCADE,
+        REFERENCES sediment_load(id) ON DELETE CASCADE,
     CONSTRAINT fk_slv_m_station_id FOREIGN KEY (measurement_station_id)
         REFERENCES measurement_station(id) ON DELETE CASCADE
 );

http://dive4elements.wald.intevation.org