# HG changeset patch # User Sascha L. Teichmann # Date 1311070251 0 # Node ID 1dbafbba50ea8554d1742179be829602c5fbdc37 # Parent d859c4bc6ace005cc0785220a740980f6715679b Schema: added missing key contraint on hyks table. flys-backend/trunk@2359 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r d859c4bc6ace -r 1dbafbba50ea flys-backend/ChangeLog --- a/flys-backend/ChangeLog Mon Jul 18 16:55:32 2011 +0000 +++ b/flys-backend/ChangeLog Tue Jul 19 10:10:51 2011 +0000 @@ -1,3 +1,10 @@ +2011-07-18 Sascha L. Teichmann + + * doc/schema/postgresql.sql: Added missing foreign key contraint on hyks table. + To update existing databases: + + ALTER TABLE hyks ADD CONSTRAINT hyks_river_id_fkey FOREIGN KEY (river_id) REFERENCES rivers(id); + 2011-07-18 Sascha L. Teichmann * src/main/java/de/intevation/flys/importer/parsers/HYKParser.java: diff -r d859c4bc6ace -r 1dbafbba50ea flys-backend/doc/schema/postgresql.sql --- a/flys-backend/doc/schema/postgresql.sql Mon Jul 18 16:55:32 2011 +0000 +++ b/flys-backend/doc/schema/postgresql.sql Tue Jul 19 10:10:51 2011 +0000 @@ -297,7 +297,7 @@ CREATE TABLE hyks ( id int PRIMARY KEY NOT NULL, - river_id int NOT NULL, + river_id int NOT NULL REFERENCES rivers(id), description VARCHAR(256) NOT NULL );