[Lada-commits] [PATCH 2 of 2] Set netzbetreiber-specific IDs UNIQUE per netzbetreiber

Wald Commits scm-commit at wald.intevation.org
Tue Apr 5 10:50:42 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1459846153 -7200
# Node ID df29083341504971655d09ddc93c7adb8db38d11
# Parent  825d82b8ad6e673ca7964f2b3638c7cce006f489
Set netzbetreiber-specific IDs UNIQUE per netzbetreiber.

diff -r 825d82b8ad6e -r df2908334150 db_schema/stammdaten_schema.sql
--- a/db_schema/stammdaten_schema.sql	Tue Apr 05 10:29:55 2016 +0200
+++ b/db_schema/stammdaten_schema.sql	Tue Apr 05 10:49:13 2016 +0200
@@ -216,7 +216,8 @@
     da_erzeuger_id character varying(2) NOT NULL,
     mst_id character varying(5) NOT NULL REFERENCES mess_stelle,
     bezeichnung character varying(120) NOT NULL,
-    letzte_aenderung timestamp without time zone
+    letzte_aenderung timestamp without time zone,
+    UNIQUE(da_erzeuger_id, netzbetreiber_id)
 );
 
 ALTER SEQUENCE datensatz_erzeuger_id_seq OWNED BY datensatz_erzeuger.id;
@@ -450,7 +451,8 @@
     netzbetreiber_id character varying(2) NOT NULL REFERENCES netz_betreiber,
     mpl_id character varying(3) NOT NULL,
     bezeichnung character varying(120) NOT NULL,
-    letzte_aenderung timestamp without time zone
+    letzte_aenderung timestamp without time zone,
+    UNIQUE(mpl_id, netzbetreiber_id)
 );
 
 ALTER SEQUENCE messprogramm_kategorie_id_seq
@@ -517,7 +519,8 @@
     mp_art character varying(10),
     aktiv character(1),
     anlage_id integer,
-    oz_id integer
+    oz_id integer,
+    UNIQUE(ort_id, netzbetreiber_id)
 );
 
 ALTER TABLE ONLY ort
@@ -602,7 +605,8 @@
     telefon character varying(20),
     tp character varying(3),
     typ character(1),
-    letzte_aenderung timestamp without time zone
+    letzte_aenderung timestamp without time zone,
+    UNIQUE(prn_id, netzbetreiber_id)
 );
 
 ALTER SEQUENCE probenehmer_id_seq OWNED BY probenehmer.id;
diff -r 825d82b8ad6e -r df2908334150 src/test/resources/log4j.properties
--- a/src/test/resources/log4j.properties	Tue Apr 05 10:29:55 2016 +0200
+++ b/src/test/resources/log4j.properties	Tue Apr 05 10:49:13 2016 +0200
@@ -1,9 +1,9 @@
-log4j.rootLogger=INFO, lada
+log4j.rootLogger=DEBUG, lada
 log4j.logger.org.apache.http=INFO
 log4j.logger.org.xnio=WARN
 log4j.logger.org.hibernate=INFO
 log4j.appender.lada=org.apache.log4j.RollingFileAppender
-log4j.appender.lada.File=../log/lada-server-test.log
+log4j.appender.lada.File=log/lada-server-test.log
 log4j.appender.lada.MaxFileSize=5MB
 log4j.appender.lada.MaxBackupIndex=5
 log4j.appender.lada.layout=org.apache.log4j.PatternLayout


More information about the Lada-commits mailing list