update contraint

This commit is contained in:
Peter Hormanns 2013-04-23 18:35:40 +02:00
parent d450793d95
commit 395d16bd5f

View File

@ -8,11 +8,10 @@ CREATE TABLE bank_account (
autodebit_ga boolean NOT NULL, autodebit_ga boolean NOT NULL,
autodebit_ar boolean NOT NULL, autodebit_ar boolean NOT NULL,
autodebit_op boolean NOT NULL, autodebit_op boolean NOT NULL,
bank_customer character varying(50), bank_customer character varying(50) NOT NULL,
bank_account character varying(10), bank_account character varying(10) NOT NULL,
bank_code character varying(8), bank_code character varying(8) NOT NULL,
bank_name character varying(50), bank_name character varying(50) NOT NULL
CONSTRAINT ckt_bank_account CHECK (((((((bank_customer IS NOT NULL) AND (bank_account IS NOT NULL)) AND (bank_code IS NOT NULL)) AND (bank_name IS NOT NULL)) AND (((autodebit_ga = true) OR (autodebit_ar = true)) OR (autodebit_op = true))) OR (((autodebit_ga = false) AND (autodebit_ar = false)) AND (autodebit_op = false))))
); );