changeset 905:df2908334150

Set netzbetreiber-specific IDs UNIQUE per netzbetreiber.
author Tom Gottfried <tom@intevation.de>
date Tue, 05 Apr 2016 10:49:13 +0200
parents 825d82b8ad6e
children ca1af8bbfe1f
files db_schema/stammdaten_schema.sql src/test/resources/log4j.properties
diffstat 2 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)