Skip to content

Remove transitional FK NOT DEFERRABLE convergence - #106

Draft
davegaeddert wants to merge 1 commit into
masterfrom
claude/remove-fk-deferrable-convergence-91em3a
Draft

Remove transitional FK NOT DEFERRABLE convergence#106
davegaeddert wants to merge 1 commit into
masterfrom
claude/remove-fk-deferrable-convergence-91em3a

Conversation

@davegaeddert

Copy link
Copy Markdown
Member

Removes the one-time convergence path that flipped legacy DEFERRABLE foreign keys — created by older Plain releases — to NOT DEFERRABLE with a catalog-only ALTER CONSTRAINT: SetConstraintNotDeferrableCorrection, DriftKind.DEFERRABLE and the ForeignKeyNameDrift member that carried it, the cs.deferrable comparison in _compare_foreign_keys, ConstraintState.deferrable, and the condeferrable column in the pg_constraint introspection query, along with the tests and helper that covered the flip. Foreign keys are still NOT DEFERRABLE by construction in _foreign_key_not_valid_sql, and the rename, replace, and validate corrections are untouched. Precondition: this may only merge once every deployed app has run postgres sync on a release containing 8cbfa0c — until then some databases still hold DEFERRABLE FKs that only this code converges, and merging early would leave them silently deferred forever.


Generated by Claude Code

Foreign keys are created NOT DEFERRABLE by construction, so the one-time
convergence path that flipped legacy DEFERRABLE FKs with a catalog-only
ALTER CONSTRAINT has no remaining job.

Drops SetConstraintNotDeferrableCorrection, DriftKind.DEFERRABLE and the
ForeignKeyNameDrift member that used it, the deferrable comparison in
_compare_foreign_keys, ConstraintState.deferrable, and the condeferrable
column from the pg_constraint introspection query. The rename, replace,
and validate corrections are unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WEvVhrMA6hqzxQGdN5AxWj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants