Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql.sql @ 496:4f2d8980415f
Schema: Dropped constraint which forces discharge tables to have a unique time interval for a given gauge and kind.
flys-backend/trunk@1850 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 08 May 2011 11:20:39 +0000 |
parents | b35c5dc0f8b7 |
children | ce9c6f05f464 |
comparison
equal
deleted
inserted
replaced
495:a92da0b3e8e7 | 496:4f2d8980415f |
---|---|
114 CREATE TABLE discharge_tables ( | 114 CREATE TABLE discharge_tables ( |
115 id int PRIMARY KEY NOT NULL, | 115 id int PRIMARY KEY NOT NULL, |
116 gauge_id int NOT NULL REFERENCES gauges(id), | 116 gauge_id int NOT NULL REFERENCES gauges(id), |
117 description VARCHAR(256) NOT NULL, | 117 description VARCHAR(256) NOT NULL, |
118 kind int NOT NULL DEFAULT 0, | 118 kind int NOT NULL DEFAULT 0, |
119 time_interval_id int REFERENCES time_intervals(id), | 119 time_interval_id int REFERENCES time_intervals(id) |
120 | 120 |
121 -- TODO: better checks | 121 -- TODO: better checks |
122 UNIQUE (gauge_id, time_interval_id) | 122 -- UNIQUE (gauge_id, kind, time_interval_id) |
123 ); | 123 ); |
124 | 124 |
125 -- Values of the Abflusstafeln | 125 -- Values of the Abflusstafeln |
126 CREATE SEQUENCE DISCHARGE_TABLE_VALUES_ID_SEQ; | 126 CREATE SEQUENCE DISCHARGE_TABLE_VALUES_ID_SEQ; |
127 | 127 |