[Lada-commits] [PATCH 10 of 14] Moved trigger creation to table definition
Wald Commits
scm-commit at wald.intevation.org
Fri Jul 1 19:55:02 CEST 2016
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1467392689 -7200
# Branch schema-update
# Node ID 1c4aa7ea63aaadea0655a786bdd2a222a8fa61eb
# Parent 1489f0ade8509bb0716f94c78ca8d7e3940c63b8
Moved trigger creation to table definition.
diff -r 1489f0ade850 -r 1c4aa7ea63aa db_schema/lada_schema.sql
--- a/db_schema/lada_schema.sql Fri Jul 01 19:01:32 2016 +0200
+++ b/db_schema/lada_schema.sql Fri Jul 01 19:04:49 2016 +0200
@@ -252,6 +252,7 @@
UNIQUE (mst_id, hauptproben_nr)
);
CREATE TRIGGER letzte_aenderung_probe BEFORE UPDATE ON probe FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung();
+CREATE TRIGGER tree_timestamp_probe BEFORE UPDATE ON probe FOR EACH ROW EXECUTE PROCEDURE update_time_probe();
--
@@ -281,6 +282,7 @@
tree_modified timestamp without time zone DEFAULT now()
);
CREATE TRIGGER letzte_aenderung_ortszuordnung BEFORE UPDATE ON ortszuordnung FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung();
+CREATE TRIGGER tree_timestamp_ort BEFORE UPDATE ON ortszuordnung FOR EACH ROW EXECUTE PROCEDURE update_time_ort();
--
@@ -299,6 +301,7 @@
UNIQUE (probe_id, pzs_id)
);
CREATE TRIGGER letzte_aenderung_zusatzwert BEFORE UPDATE ON zusatz_wert FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung();
+CREATE TRIGGER tree_timestamp_zusatzwert BEFORE UPDATE ON zusatz_wert FOR EACH ROW EXECUTE PROCEDURE update_time_zusatzwert();
--
@@ -396,6 +399,7 @@
geplant boolean DEFAULT false NOT NULL,
tree_modified timestamp without time zone DEFAULT now()
);
+CREATE TRIGGER tree_timestamp_messung BEFORE UPDATE ON messung FOR EACH ROW EXECUTE PROCEDURE update_time_messung();
--
@@ -430,6 +434,7 @@
UNIQUE (messungs_id, messgroesse_id)
);
CREATE TRIGGER letzte_aenderung_messwert BEFORE UPDATE ON messwert FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung();
+CREATE TRIGGER tree_timestamp_messwert BEFORE UPDATE ON messwert FOR EACH ROW EXECUTE PROCEDURE update_time_messwert();
--
@@ -446,6 +451,7 @@
status_wert integer NOT NULL REFERENCES stammdaten.status_wert,
tree_modified timestamp without time zone DEFAULT now()
);
+CREATE TRIGGER tree_timestamp_status BEFORE UPDATE ON status_protokoll FOR EACH ROW EXECUTE PROCEDURE update_time_status();
--
@@ -469,46 +475,4 @@
CREATE INDEX probe_id_idx ON probe USING btree (id);
---
--- Name: tree_timestamp_status; Type: TRIGGER; Schema: land; Owner: -
---
-
-CREATE TRIGGER tree_timestamp_status BEFORE UPDATE ON status_protokoll FOR EACH ROW EXECUTE PROCEDURE update_time_status();
-
-
---
--- Name: tree_timestamp_messung; Type: TRIGGER; Schema: land; Owner: -
---
-
-CREATE TRIGGER tree_timestamp_messung BEFORE UPDATE ON messung FOR EACH ROW EXECUTE PROCEDURE update_time_messung();
-
-
---
--- Name: tree_timestamp_messwert; Type: TRIGGER; Schema: land; Owner: -
---
-
-CREATE TRIGGER tree_timestamp_messwert BEFORE UPDATE ON messwert FOR EACH ROW EXECUTE PROCEDURE update_time_messwert();
-
-
---
--- Name: tree_timestamp_ort; Type: TRIGGER; Schema: land; Owner: -
---
-
-CREATE TRIGGER tree_timestamp_ort BEFORE UPDATE ON ortszuordnung FOR EACH ROW EXECUTE PROCEDURE update_time_ort();
-
-
---
--- Name: tree_timestamp_probe; Type: TRIGGER; Schema: land; Owner: -
---
-
-CREATE TRIGGER tree_timestamp_probe BEFORE UPDATE ON probe FOR EACH ROW EXECUTE PROCEDURE update_time_probe();
-
-
---
--- Name: tree_timestamp_zusatzwert; Type: TRIGGER; Schema: land; Owner: -
---
-
-CREATE TRIGGER tree_timestamp_zusatzwert BEFORE UPDATE ON zusatz_wert FOR EACH ROW EXECUTE PROCEDURE update_time_zusatzwert();
-
-
COMMIT;
More information about the Lada-commits
mailing list