# HG changeset patch # User Raimund Renkert # Date 1467395241 -7200 # Node ID 552215760ba82b2887384b42e159961427392291 # Parent 8ec5ee1c2dc65c72ecfad891d29ee5a6c4587aa6 Moved messung.status FK constraint. diff -r 8ec5ee1c2dc6 -r 552215760ba8 db_schema/lada_schema.sql --- 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: