diff --git a/hsarback/database/schema.sql b/hsarback/database/schema.sql index 1571a5f..093f566 100644 --- a/hsarback/database/schema.sql +++ b/hsarback/database/schema.sql @@ -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) + ) );