Found while fixing M1/M1b (composite/partial unique handling in the schema.sql path). crates/jerrycan/src/platform/migrate/live.rs — the --live catalog front-end — only sets unique on the primary key; it reads no table-level UNIQUE constraints and no unique indexes (single-column, composite, or partial). So a live migration silently drops the entire unique class: the migrated app permits duplicates the source rejects, with no gap item.
This is the same silent-drop class as M1 (#309) and M1b, but in a different front-end, and broader (every unique, not just composite). Pre-existing.
Suggested: read pg_constraint (contype='u') and pg_index (indisunique, with indpred for partial) in live mode and route them through the same composite_uniques / unrepresentable_uniques / unique_reproducible machinery M1/M1b added, so live and schema.sql paths agree. Also noted: UNIQUE ... NULLS NOT DISTINCT is under-enforced on both paths.
Found while fixing M1/M1b (composite/partial unique handling in the schema.sql path).
crates/jerrycan/src/platform/migrate/live.rs— the--livecatalog front-end — only setsuniqueon the primary key; it reads no table-level UNIQUE constraints and no unique indexes (single-column, composite, or partial). So a live migration silently drops the entire unique class: the migrated app permits duplicates the source rejects, with no gap item.This is the same silent-drop class as M1 (#309) and M1b, but in a different front-end, and broader (every unique, not just composite). Pre-existing.
Suggested: read
pg_constraint(contype='u') andpg_index(indisunique, withindpredfor partial) in live mode and route them through the samecomposite_uniques/unrepresentable_uniques/unique_reproduciblemachinery M1/M1b added, so live and schema.sql paths agree. Also noted:UNIQUE ... NULLS NOT DISTINCTis under-enforced on both paths.