update contraint

This commit is contained in:
Peter Hormanns 2013-04-23 18:17:13 +02:00
parent 7787bbf5aa
commit d450793d95

View File

@ -153,7 +153,15 @@ CREATE TABLE component (
increment_quantity integer NOT NULL,
include_quantity integer NOT NULL,
admin_only boolean NOT NULL,
CONSTRAINT ckt_component CHECK (((((((((min_quantity <= max_quantity) AND (min_quantity <= default_quantity)) AND (default_quantity <= max_quantity)) AND (min_quantity <= include_quantity)) AND (include_quantity <= max_quantity)) AND (mod(max_quantity, increment_quantity) = 0)) AND (mod(default_quantity, increment_quantity) = 0)) AND (mod(include_quantity, increment_quantity) = 0)))
CONSTRAINT ckt_component CHECK (
(min_quantity <= max_quantity) AND
(min_quantity <= default_quantity) AND
(default_quantity <= max_quantity) AND
(include_quantity <= max_quantity) AND
(mod(max_quantity, increment_quantity) = 0) AND
(mod(default_quantity, increment_quantity) = 0) AND
(mod(include_quantity, increment_quantity) = 0)
)
);