Mercurial > dive4elements > river
diff flys-backend/doc/schema/postgresql.sql @ 167:15d515fe15f5
Added POJOs to be mapped to schema.
flys-backend/trunk@1456 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 10 Mar 2011 13:44:51 +0000 |
parents | 324e12ab7a05 |
children | 86a1bd9cc50e |
line wrap: on
line diff
--- a/flys-backend/doc/schema/postgresql.sql Wed Mar 09 15:24:57 2011 +0000 +++ b/flys-backend/doc/schema/postgresql.sql Thu Mar 10 13:44:51 2011 +0000 @@ -49,7 +49,8 @@ -- Streckengueltigkeit range_id int NOT NULL REFERENCES ranges (id), - UNIQUE (name, river_id) + UNIQUE (name, river_id), + UNIQUE (river_id, datum) ); -- Type of a Hauptwert 'W', 'Q', 'D', etc. @@ -88,7 +89,7 @@ ); -- Abflusstafeln -CREATE TABLE discharge_table ( +CREATE TABLE discharge_tables ( id int PRIMARY KEY NOT NULL, gauge_id int NOT NULL REFERENCES gauges(id), @@ -101,7 +102,7 @@ -- Values of the Abflusstafeln CREATE TABLE discharge_table_values ( id int PRIMARY KEY NOT NULL, - table_id int NOT NULL REFERENCES discharge_table(id), + table_id int NOT NULL REFERENCES discharge_tables(id), q NUMERIC NOT NULL, w NUMERIC NOT NULL,