Constraint fuer Mitglieder Tabelle angepasst

This commit is contained in:
Peter Hormanns 2011-05-24 15:22:44 +00:00
parent ca49873000
commit 4885b5dc12

View File

@ -122,7 +122,7 @@ CREATE TABLE business_partner (
uid_vat character varying(20),
CONSTRAINT ckc_member_id_business CHECK (((member_id >= 10000) AND (member_id <= 99999))),
CONSTRAINT ckc_shares_signed_business CHECK ((shares_signed >= 0)),
CONSTRAINT ckt_business_partner CHECK ((((((member_since IS NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NULL))) OR (((member_since IS NOT NULL) AND (member_until IS NOT NULL)) AND (member_since < member_until))) AND ((((member_code)::text ~~ 'hsh00-%'::text) AND (member_since IS NOT NULL)) OR (((member_code)::text !~~ 'hsh00-%'::text) AND (member_since IS NULL)))))
CONSTRAINT ckt_business_partner CHECK ( ( ((member_since IS NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NOT NULL) AND (member_since < member_until)) ) AND ((member_code)::text ~~ 'hsh00-%'::text))
);