Drop legacy bucket_key/requested_bucket_key columns - #11878
Merged
Conversation
Fixes #11872. Follow-up to #11871, which kept these columns around through one deploy so a rolling restart couldn't have old code hit a missing-column error while new code was already writing bucket_id/ requested_bucket_id. Verified the bucket_id backfill against a fresh production dump (zero mismatches, only pre-existing orphans below 1%) and confirmed live post-deploy writes are FK-only before running this. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drops the legacy
bucket_key/requested_bucket_keystring columns (and thebucket_key_null_for_non_slot_occupying_statescheck constraint onsignups) that #11871 deliberately kept in place for one release, so a rolling/partial deploy couldn't have old code hit a missing-column error while new code was already writingbucket_id/requested_bucket_id.signups: dropsbucket_key,requested_bucket_key, and the now-redundant check constraint (superseded bybucket_id_null_for_non_slot_occupying_statesfrom Convert bucket_key/requested_bucket_key to real foreign keys #11871).signup_requests,signup_ranked_choices: droprequested_bucket_key.signup_changes(audit log): dropsbucket_key,requested_bucket_key— thebucket_name/requested_bucket_namesnapshot columns added in Convert bucket_key/requested_bucket_key to real foreign keys #11871 already cover display needs after a bucket is deleted.Verification before merging
Since this drop is only safe once the #11871 backfill is confirmed correct and the new code is actually live:
bucket_idset with no legacy key ever written (the new code path), with none of that pattern appearing on rows from before the deploy timestamp — i.e., the cutover is real and clean, not just a coincidence of the backfill.bucket_key/requested_bucket_keyreader methods and the unrelatedregistration_policy_buckets.keycolumn, both of which are intentionally kept).Fixes #11872
🤖 Generated with Claude Code