Repository navigation
Revert "sql: don't drop table constraints after a nullable UNIQUE" - #39660
Conversation
bosconi
left a comment
There was a problem hiding this comment.
Looks good. Claude verified it's a clean revert.
QA LLM Review (Post Merge)@antiguru — an automated review of commit 1. MEDIUM -- Revert re-opens the unsafe-flag bypass for CHECK and FOREIGN KEY constraints
The restored DetailsReproduced with the image built from 134006e, whose
The crash that motivated the revert came from changes to nullability and keys. The gate checks can be restored on their own without bringing it back: run the ForeignKey/Check arms in a separate pass over |
Reverts #39598.
#39598 changes the
RelationDescthat replanning produces for existing tables and source exports whose constraints the old planner dropped. It can add keys and flip primary key columns to NOT NULL. Persist stores the fullRelationDesc, keys included, as the shard schema and finds writer schemas by equality, and tables and source exports have no schema evolution at bootstrap. After an upgrade, affected tables panic environmentd at boot inregister_table_collections, and affected Postgres and MySQL source exports crash-loop the replica that ingests them. Re-landing the fix needs a catalog migration or a per-export flag that keeps existing descs stable, plus platform-checks for both shapes. Details are in the post-merge review on #39598.🤖 Generated with Claude Code