14.x → 15.0.0, entry by entry
One breaking entry, and it is a compile error only for code that exhaustively switches over a type it does not own. Nothing changes at runtime and no data migrates.
| # | Surface | Costs you an edit if |
|---|---|---|
| 1 | DriftKind gains missing-check | you switch over DriftKind with no default |
1. DriftKind gains missing-check
The same shape 4.0.0 recorded when it gained changed-foreign-key. Add a default, or handle the
new member:
case 'missing-check':
// the snapshot names a CHECK constraint the catalog does not hold
break;It compares conname and never the definition, and that is not an optimisation — it is the
only comparison that can work. pg_get_constraintdef answers Postgres' own rewriting:
status in ('draft','published') comes back as
CHECK ((status = ANY (ARRAY['draft'::text, 'published'::text]))). Comparing that text against a
generated predicate would report a correct database as drifted, forever.
Only the declared side is judged, so a NOT NULL (contype='n' on PG17+), an enumerated()
column's old anonymous constraint and an extension's own constraints are all silent.