Mercurial > dive4elements > river
diff backend/doc/schema/postgresql.sql @ 5883:4f35b34f4efa
Schema change: add constraint to discharge tables
author | Tom Gottfried <tom.gottfried@intevation.de> |
---|---|
date | Tue, 30 Apr 2013 12:53:10 +0200 |
parents | 5aa05a7a34b7 |
children | c1abd48a03e2 |
line wrap: on
line diff
--- a/backend/doc/schema/postgresql.sql Tue Apr 30 11:14:58 2013 +0200 +++ b/backend/doc/schema/postgresql.sql Tue Apr 30 12:53:10 2013 +0200 @@ -149,10 +149,8 @@ description VARCHAR(256) NOT NULL, bfg_id VARCHAR(50), kind int NOT NULL DEFAULT 0, - time_interval_id int REFERENCES time_intervals(id) - - -- TODO: better checks - -- UNIQUE (gauge_id, kind, time_interval_id) + time_interval_id int REFERENCES time_intervals(id), + UNIQUE(gauge_id, time_interval_id, kind) ); -- Values of the Abflusstafeln