# HG changeset patch # User Sascha L. Teichmann # Date 1404914584 -7200 # Node ID 4ec43afaa263c05785eaea490822588d7310a4dd # Parent 139b057a39ddbcb75a11e8ca6973e87854d06de0# Parent aa8dcf7331a815fc32962a817b6285e7eac31168 Merged diff -r 139b057a39dd -r 4ec43afaa263 backend/doc/schema/oracle-drop-minfo.sql --- 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; diff -r 139b057a39dd -r 4ec43afaa263 backend/doc/schema/oracle-minfo.sql --- 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 ); diff -r 139b057a39dd -r 4ec43afaa263 backend/doc/schema/postgresql-minfo.sql --- 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 );