Mercurial > dive4elements > river
changeset 8018:ad614eff7a9b
SCHEMA CHANGE: consistent naming scheme and drop script for sediment load at measurement stations.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 09 Jul 2014 15:51:31 +0200 |
parents | bcb05a98bb3f |
children | aa8dcf7331a8 |
files | backend/doc/schema/oracle-drop-minfo.sql backend/doc/schema/oracle-minfo.sql backend/doc/schema/postgresql-minfo.sql |
diffstat | 3 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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,
--- 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,