Mercurial > lada > lada-server
diff 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 |
line wrap: on
line diff
--- a/db_schema/lada_schema.sql Fri Oct 28 18:49:41 2016 +0200 +++ b/db_schema/lada_schema.sql Fri Oct 28 21:19:44 2016 +0200 @@ -122,7 +122,7 @@ ba_id integer DEFAULT 1 REFERENCES stammdaten.betriebsart, gem_id character varying(8) REFERENCES stammdaten.verwaltungseinheit, ort_id integer NOT NULL REFERENCES stammdaten.ort, - media_desk character varying(100), + media_desk character varying(100) CHECK(media_desk LIKE '% %'), umw_id character varying(3) REFERENCES stammdaten.umwelt, probenart_id integer NOT NULL REFERENCES stammdaten.probenart, probenintervall character varying(2) NOT NULL, @@ -200,7 +200,7 @@ datenbasis_id smallint REFERENCES stammdaten.datenbasis, ba_id integer REFERENCES stammdaten.betriebsart, probenart_id smallint NOT NULL REFERENCES stammdaten.probenart, - media_desk character varying(100), + media_desk character varying(100) CHECK(media_desk LIKE '% %'), media character varying(100), umw_id character varying(3) REFERENCES stammdaten.umwelt, probeentnahme_beginn timestamp with time zone,