Skip to content

Constraint

Defines a constraint

Properties

Property Type Required Description
name string โ€” The constraint name.
enforced boolean โ€” false renders NOT ENFORCED (PostgreSQL 18+), which stops the constraint being checked. PostgreSQL records a not-enforced constraint as not validated as well. Absent means enforced, the default.
not_valid boolean โ€” true renders NOT VALID: rows already in the table were never checked, only new ones are. The state holds only when the constraint is added with ALTER TABLE, so the build writes it that way. Absent means valid, the default.

Source: schemata/constraint.yml ยท Resolved JSON Schema: constraint.json