You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(db diff): filter inherited constraints for partitioned tables
when a foreign key references a partitioned table, postgresql automatically
creates inherited constraints with numeric suffixes (fkey1, fkey2, etc.) for
each partition. migra treats these as independent constraints and generates
drop/add statements for them, which fails because postgresql forbids dropping
inherited constraints directly.
this change filters out alter table statements that operate on constraints
matching the pattern fkey followed by digits, as these are always postgresql
auto-generated inherited constraints. legitimate user-defined constraints
(like users_id_fkey without numeric suffix) are preserved.
the fix is applied to both the migra and pgadmin diff paths to ensure
consistent behavior across all diff methods.
closes#4562
0 commit comments