Mercurial > lada > lada-server
changeset 1003:552215760ba8 schema-update
Moved messung.status FK constraint.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 01 Jul 2016 19:47:21 +0200 |
parents | 8ec5ee1c2dc6 |
children | c0ff3965c266 |
files | db_schema/lada_schema.sql |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/db_schema/lada_schema.sql Fri Jul 01 19:46:11 2016 +0200 +++ b/db_schema/lada_schema.sql Fri Jul 01 19:47:21 2016 +0200 @@ -339,7 +339,7 @@ messdauer integer, messzeitpunkt timestamp with time zone, fertig boolean DEFAULT false NOT NULL, - status integer REFERENCES status_protokoll, + status integer, letzte_aenderung timestamp without time zone DEFAULT now(), geplant boolean DEFAULT false NOT NULL, tree_modified timestamp without time zone DEFAULT now() @@ -399,6 +399,9 @@ ); CREATE TRIGGER tree_modified_status_protokoll BEFORE UPDATE ON status_protokoll FOR EACH ROW EXECUTE PROCEDURE update_tree_modified(); +ALTER TABLE ONLY messung + ADD CONSTRAINT messung_status_protokoll_id_fkey FOREIGN KEY (status) REFERENCES status_protokoll(id); + -- -- Name: messung_probe_id_idx; Type: INDEX; Schema: land; Owner: -; Tablespace: