Mercurial > dive4elements > river
diff backend/doc/schema/postgresql.sql @ 7005:dddf633fec05 double-precision
SCHEMA CHANGE: a < b now enforced on ranges.
author | Tom Gottfried <tom.gottfried@intevation.de> |
---|---|
date | Thu, 12 Sep 2013 21:12:59 +0200 |
parents | 5ce6a3d7d632 |
children | 44a9233c62eb |
line wrap: on
line diff
--- a/backend/doc/schema/postgresql.sql Thu Sep 12 19:15:07 2013 +0200 +++ b/backend/doc/schema/postgresql.sql Thu Sep 12 21:12:59 2013 +0200 @@ -34,7 +34,8 @@ river_id int NOT NULL REFERENCES rivers(id) ON DELETE CASCADE, a NUMERIC NOT NULL, b NUMERIC, - UNIQUE (river_id, a, b) + UNIQUE (river_id, a, b), + CHECK (a < b) );