# HG changeset patch # User Tom Gottfried # Date 1404913891 -7200 # Node ID ad614eff7a9b22e37510861e3e4a5128341f9a8f # Parent bcb05a98bb3fe60bc3bdafa660372e2aa907c55a SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations. diff -r bcb05a98bb3f -r ad614eff7a9b backend/doc/schema/oracle-drop-minfo.sql --- a/backend/doc/schema/oracle-drop-minfo.sql Tue Jul 08 19:44:54 2014 +0200 +++ b/backend/doc/schema/oracle-drop-minfo.sql Wed Jul 09 15:51:31 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 bcb05a98bb3f -r ad614eff7a9b backend/doc/schema/oracle-minfo.sql --- a/backend/doc/schema/oracle-minfo.sql Tue Jul 08 19:44:54 2014 +0200 +++ b/backend/doc/schema/oracle-minfo.sql Wed Jul 09 15:51:31 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, diff -r bcb05a98bb3f -r ad614eff7a9b backend/doc/schema/postgresql-minfo.sql --- a/backend/doc/schema/postgresql-minfo.sql Tue Jul 08 19:44:54 2014 +0200 +++ b/backend/doc/schema/postgresql-minfo.sql Wed Jul 09 15:51:31 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,