[Lada-commits] [PATCH] Added unique constraint to result.query_id and result.data_index and fixed data

Wald Commits scm-commit at wald.intevation.org
Wed Jun 29 19:23:53 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1467221030 -7200
# Node ID 35878d9b432162e089161e65a5e0b3d9a70f01c0
# Parent  1f7e40f27103fe29c3f59e523507418c8bc3d5d4
Added unique constraint to result.query_id and result.data_index and fixed data
set.

diff -r 1f7e40f27103 -r 35878d9b4321 db_schema/stammdaten_data.sql
--- a/db_schema/stammdaten_data.sql	Wed Jun 29 19:06:33 2016 +0200
+++ b/db_schema/stammdaten_data.sql	Wed Jun 29 19:23:50 2016 +0200
@@ -36911,24 +36911,14 @@
 59	5	eGem	E-Gemeinde	200	f	10
 60	5	probeId	Probe Id	100	f	11
 61	7	hpNr	Proben-Nr	100	f	0
-62	7	probeId	Probe Id	100	f	0
-63	7	netzbetreiberId	Land	50	f	1
 64	7	dBasis	DB	50	f	1
-65	7	mstId	MST	60	f	2
 66	7	netzId	Land	50	f	2
 67	7	mstId	MST	60	f	3
-68	7	entnahmeVon	Entnahme von	120	f	3
-69	7	entnahmeBis	Entnahme bis	120	f	4
 70	7	umwId	Umw-ID	55	f	4
 71	7	pArt	PA	50	f	5
-72	7	umwId	Umweltbereich	100	f	5
 73	7	peBegin	Entnahme_von	120	f	6
-74	7	hauptprobenNr	Proben Nr	100	f	6
-75	7	ortsTyp	Ortstyp	50	f	7
 76	7	peEnd	Entnahme_bis	120	f	7
 77	7	ortId	Ort_id	100	f	8
-78	7	gemId	Gemeinde Id	100	f	8
-79	7	bezeichnung	Gemeinde	400	t	9
 80	7	eGemId	E-Gem Id	80	f	9
 81	7	eGem	E-Gemeinde	200	f	10
 82	7	probeId	Probe Id	100	f	11
diff -r 1f7e40f27103 -r 35878d9b4321 db_schema/stammdaten_schema.sql
--- a/db_schema/stammdaten_schema.sql	Wed Jun 29 19:06:33 2016 +0200
+++ b/db_schema/stammdaten_schema.sql	Wed Jun 29 19:23:50 2016 +0200
@@ -658,6 +658,7 @@
     flex boolean,
     index integer
 );
+ALTER TABLE result ADD CONSTRAINT data_index_query_id UNIQUE (query_id, data_index)
 
 ALTER SEQUENCE result_id_seq OWNED BY result.id;
 


More information about the Lada-commits mailing list