Mercurial > lada > lada-server
comparison db_schema/lada_schema.sql @ 1010:c1e00e1fe5c8 schema-update
Use status_kombi as FK in status_protokol
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 04 Jul 2016 11:24:59 +0200 |
parents | f0ac901a4387 |
children | d77178ccbcbc |
comparison
equal
deleted
inserted
replaced
1009:f0ac901a4387 | 1010:c1e00e1fe5c8 |
---|---|
300 id serial PRIMARY KEY, | 300 id serial PRIMARY KEY, |
301 mst_id character varying(5) NOT NULL REFERENCES stammdaten.mess_stelle, | 301 mst_id character varying(5) NOT NULL REFERENCES stammdaten.mess_stelle, |
302 datum timestamp without time zone DEFAULT now(), | 302 datum timestamp without time zone DEFAULT now(), |
303 text character varying(1024), | 303 text character varying(1024), |
304 messungs_id integer NOT NULL REFERENCES messung ON DELETE CASCADE, | 304 messungs_id integer NOT NULL REFERENCES messung ON DELETE CASCADE, |
305 status_stufe integer NOT NULL REFERENCES stammdaten.status_stufe, | 305 status_kombi integer NOT NULL REFERENCES stammdaten.status_kombi, |
306 status_wert integer NOT NULL REFERENCES stammdaten.status_wert, | |
307 tree_modified timestamp without time zone DEFAULT now() | 306 tree_modified timestamp without time zone DEFAULT now() |
308 ); | 307 ); |
309 CREATE TRIGGER tree_modified_status_protokoll BEFORE UPDATE ON status_protokoll FOR EACH ROW EXECUTE PROCEDURE update_tree_modified(); | 308 CREATE TRIGGER tree_modified_status_protokoll BEFORE UPDATE ON status_protokoll FOR EACH ROW EXECUTE PROCEDURE update_tree_modified(); |
310 | 309 |
311 ALTER TABLE ONLY messung | 310 ALTER TABLE ONLY messung |