schema: Fix check constraints on template crop/location

pull/416/head
Mike Lang 1 month ago
parent befe9448cb
commit a65cc6dcfe

@ -191,8 +191,6 @@ CREATE TABLE templates (
image BYTEA NOT NULL, image BYTEA NOT NULL,
description TEXT NOT NULL DEFAULT '', description TEXT NOT NULL DEFAULT '',
attribution TEXT NOT NULL DEFAULT '', attribution TEXT NOT NULL DEFAULT '',
crop INTEGER[] NOT NULL CHECK ( crop INTEGER[] NOT NULL CHECK (cardinality(crop) = 4),
cardinality(thumbnail_crop) = 4), location INTEGER[] NOT NULL CHECK (cardinality(location) = 4)
location INTEGER[] NOT NULL CHECK (
cardinality(thumbnail_crop) = 4)
); );

Loading…
Cancel
Save