comparison 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
comparison
equal deleted inserted replaced
1053:a7404bf577fd 1054:3c9616e5439f
581 probenart_id integer NOT NULL REFERENCES stammdaten.probenart, 581 probenart_id integer NOT NULL REFERENCES stammdaten.probenart,
582 probenintervall character varying(2) NOT NULL, 582 probenintervall character varying(2) NOT NULL,
583 teilintervall_von integer NOT NULL, 583 teilintervall_von integer NOT NULL,
584 teilintervall_bis integer NOT NULL, 584 teilintervall_bis integer NOT NULL,
585 intervall_offset integer, 585 intervall_offset integer,
586 gueltig_von integer NOT NULL, 586 gueltig_von integer NOT NULL CHECK(gueltig_von BETWEEN 0 AND 364),
587 gueltig_bis integer NOT NULL, 587 gueltig_bis integer NOT NULL CHECK(gueltig_bis BETWEEN 0 AND 364),
588 probe_nehmer_id integer, 588 probe_nehmer_id integer,
589 probe_kommentar character varying(80), 589 probe_kommentar character varying(80),
590 letzte_aenderung timestamp without time zone DEFAULT now() NOT NULL, 590 letzte_aenderung timestamp without time zone DEFAULT now() NOT NULL,
591 CHECK (teilintervall_von <= teilintervall_bis), 591 CHECK (teilintervall_von <= teilintervall_bis)
592 CHECK (gueltig_von <= gueltig_bis)
593 ); 592 );
594 CREATE TRIGGER letzte_aenderung_messprogramm BEFORE UPDATE ON messprogramm FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung(); 593 CREATE TRIGGER letzte_aenderung_messprogramm BEFORE UPDATE ON messprogramm FOR EACH ROW EXECUTE PROCEDURE update_letzte_aenderung();
595 594
596 -- 595 --
597 -- Name: messprogramm_id_seq; Type: SEQUENCE OWNED BY; Schema: land; Owner: - 596 -- Name: messprogramm_id_seq; Type: SEQUENCE OWNED BY; Schema: land; Owner: -
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)