[Lada-commits] [PATCH 1 of 3] Added unique constraint for probe.id_alt

Wald Commits scm-commit at wald.intevation.org
Fri Sep 9 15:36:13 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1473427984 -7200
# Branch schema-update
# Node ID 434b46ead134835c151359331fb05700ef29bffe
# Parent  1b9516c60a5ab1444fc78975545c50d5158b3061
Added unique constraint for probe.id_alt

diff -r 1b9516c60a5a -r 434b46ead134 db_schema/lada_schema.sql
--- a/db_schema/lada_schema.sql	Mon Sep 05 10:19:23 2016 +0200
+++ b/db_schema/lada_schema.sql	Fri Sep 09 15:33:04 2016 +0200
@@ -180,7 +180,7 @@
     solldatum_beginn timestamp without time zone,
     solldatum_ende timestamp without time zone,
     tree_modified timestamp without time zone DEFAULT now(),
-    UNIQUE (mst_id, hauptproben_nr)
+    UNIQUE (mst_id, hauptproben_nr, id_alt)
 );
 CREATE TRIGGER letzte_aenderung_probe BEFORE UPDATE ON probe FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung();
 CREATE TRIGGER tree_modified_probe BEFORE UPDATE ON probe FOR EACH ROW EXECUTE PROCEDURE update_tree_modified_probe();


More information about the Lada-commits mailing list