Mercurial > lada > lada-server
diff db_schema/lada_schema.sql @ 1054:3c9616e5439f
Remove wrong period check.
The validity period can be e.g. from November till February,
thus spanning over turn of the year and allowing a from value
greater than to value (in terms of day of year).
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 23 Sep 2016 17:56:22 +0200 |
parents | 61b94641cf99 |
children | a435b9fd1d85 |
line wrap: on
line diff
--- a/db_schema/lada_schema.sql Thu Sep 22 16:14:57 2016 +0200 +++ b/db_schema/lada_schema.sql Fri Sep 23 17:56:22 2016 +0200 @@ -583,13 +583,12 @@ teilintervall_von integer NOT NULL, teilintervall_bis integer NOT NULL, intervall_offset integer, - gueltig_von integer NOT NULL, - gueltig_bis integer NOT NULL, + gueltig_von integer NOT NULL CHECK(gueltig_von BETWEEN 0 AND 364), + gueltig_bis integer NOT NULL CHECK(gueltig_bis BETWEEN 0 AND 364), probe_nehmer_id integer, probe_kommentar character varying(80), letzte_aenderung timestamp without time zone DEFAULT now() NOT NULL, - CHECK (teilintervall_von <= teilintervall_bis), - CHECK (gueltig_von <= gueltig_bis) + CHECK (teilintervall_von <= teilintervall_bis) ); CREATE TRIGGER letzte_aenderung_messprogramm BEFORE UPDATE ON messprogramm FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung();