comparison db_schema/lada_schema.sql @ 1122:1ef08710aaeb

Do not allow empty string for media descriptor. For the sake of clearness NULL should be used for a missing value. This avoids extra checks e.g. for generating LAF exports. The CHECK constraints in the database could be more elaborate.
author Tom Gottfried <tom@intevation.de>
date Fri, 28 Oct 2016 21:19:44 +0200
parents 7061388e0af7
children 70b51893f15b
comparison
equal deleted inserted replaced
1121:24f374c771b3 1122:1ef08710aaeb
120 labor_mst_id character varying(5) NOT NULL REFERENCES stammdaten.mess_stelle, 120 labor_mst_id character varying(5) NOT NULL REFERENCES stammdaten.mess_stelle,
121 datenbasis_id integer NOT NULL REFERENCES stammdaten.datenbasis, 121 datenbasis_id integer NOT NULL REFERENCES stammdaten.datenbasis,
122 ba_id integer DEFAULT 1 REFERENCES stammdaten.betriebsart, 122 ba_id integer DEFAULT 1 REFERENCES stammdaten.betriebsart,
123 gem_id character varying(8) REFERENCES stammdaten.verwaltungseinheit, 123 gem_id character varying(8) REFERENCES stammdaten.verwaltungseinheit,
124 ort_id integer NOT NULL REFERENCES stammdaten.ort, 124 ort_id integer NOT NULL REFERENCES stammdaten.ort,
125 media_desk character varying(100), 125 media_desk character varying(100) CHECK(media_desk LIKE '% %'),
126 umw_id character varying(3) REFERENCES stammdaten.umwelt, 126 umw_id character varying(3) REFERENCES stammdaten.umwelt,
127 probenart_id integer NOT NULL REFERENCES stammdaten.probenart, 127 probenart_id integer NOT NULL REFERENCES stammdaten.probenart,
128 probenintervall character varying(2) NOT NULL, 128 probenintervall character varying(2) NOT NULL,
129 teilintervall_von integer NOT NULL, 129 teilintervall_von integer NOT NULL,
130 teilintervall_bis integer NOT NULL, 130 teilintervall_bis integer NOT NULL,
198 labor_mst_id character varying(5) NOT NULL REFERENCES stammdaten.mess_stelle, 198 labor_mst_id character varying(5) NOT NULL REFERENCES stammdaten.mess_stelle,
199 hauptproben_nr character varying(20), 199 hauptproben_nr character varying(20),
200 datenbasis_id smallint REFERENCES stammdaten.datenbasis, 200 datenbasis_id smallint REFERENCES stammdaten.datenbasis,
201 ba_id integer REFERENCES stammdaten.betriebsart, 201 ba_id integer REFERENCES stammdaten.betriebsart,
202 probenart_id smallint NOT NULL REFERENCES stammdaten.probenart, 202 probenart_id smallint NOT NULL REFERENCES stammdaten.probenart,
203 media_desk character varying(100), 203 media_desk character varying(100) CHECK(media_desk LIKE '% %'),
204 media character varying(100), 204 media character varying(100),
205 umw_id character varying(3) REFERENCES stammdaten.umwelt, 205 umw_id character varying(3) REFERENCES stammdaten.umwelt,
206 probeentnahme_beginn timestamp with time zone, 206 probeentnahme_beginn timestamp with time zone,
207 probeentnahme_ende timestamp with time zone, 207 probeentnahme_ende timestamp with time zone,
208 mittelungsdauer bigint, 208 mittelungsdauer bigint,
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)