Mercurial > dive4elements > river
comparison backend/doc/schema/postgresql-minfo.sql @ 8059:bde5f5ec7c72
SCHEMA CHANGE and Importer: get time intervals of SQ-relations from metalines in sediment load files.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 18 Jul 2014 18:01:49 +0200 |
parents | fd3a24336e6a |
children | 5f28aa1be795 |
comparison
equal
deleted
inserted
replaced
8058:fbe3ba5a480e | 8059:bde5f5ec7c72 |
---|---|
273 id int NOT NULL, | 273 id int NOT NULL, |
274 river_id int NOT NULL, | 274 river_id int NOT NULL, |
275 grain_fraction_id int, | 275 grain_fraction_id int, |
276 unit_id int NOT NULL, | 276 unit_id int NOT NULL, |
277 time_interval_id int NOT NULL, | 277 time_interval_id int NOT NULL, |
278 sq_time_interval_id int, | |
278 description VARCHAR(256), | 279 description VARCHAR(256), |
279 kind int, | 280 kind int, |
280 PRIMARY KEY (id), | 281 PRIMARY KEY (id), |
281 CONSTRAINT fk_sy_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE, | 282 CONSTRAINT fk_sy_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE, |
282 CONSTRAINT fk_sy_kind_id FOREIGN KEY (kind) REFERENCES sediment_yield_kinds(id), | 283 CONSTRAINT fk_sy_kind_id FOREIGN KEY (kind) REFERENCES sediment_yield_kinds(id), |
283 CONSTRAINT fk_sy_grain_fraction_id FOREIGN KEY (grain_fraction_id) REFERENCES grain_fraction(id), | 284 CONSTRAINT fk_sy_grain_fraction_id FOREIGN KEY (grain_fraction_id) REFERENCES grain_fraction(id), |
284 CONSTRAINT fk_sy_unit_id FOREIGN KEY (unit_id) REFERENCES units(id), | 285 CONSTRAINT fk_sy_unit_id FOREIGN KEY (unit_id) REFERENCES units(id), |
285 CONSTRAINT fk_sy_time_interval_id FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id) | 286 CONSTRAINT fk_sy_time_interval_id FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id), |
287 CONSTRAINT fk_sy_sq_time_interval_id FOREIGN KEY (sq_time_interval_id) | |
288 REFERENCES time_intervals(id) | |
286 ); | 289 ); |
287 | 290 |
288 | 291 |
289 CREATE SEQUENCE SEDIMENT_YIELD_VALUES_ID_SEQ; | 292 CREATE SEQUENCE SEDIMENT_YIELD_VALUES_ID_SEQ; |
290 | 293 |