Skip to content

Drop legacy bucket_key/requested_bucket_key columns - #11878

Merged
nbudin merged 1 commit into
mainfrom
11872-drop-legacy-bucket-key-columns
Aug 5, 2026
Merged

Drop legacy bucket_key/requested_bucket_key columns#11878
nbudin merged 1 commit into
mainfrom
11872-drop-legacy-bucket-key-columns

Conversation

@nbudin

@nbudin nbudin commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Drops the legacy bucket_key/requested_bucket_key string columns (and the bucket_key_null_for_non_slot_occupying_states check constraint on signups) 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 writing bucket_id/requested_bucket_id.

Verification before merging

Since this drop is only safe once the #11871 backfill is confirmed correct and the new code is actually live:

  • Pulled a fresh production database dump (after the Convert bucket_key/requested_bucket_key to real foreign keys #11871 deploy had been running for a while) into development and ran a verification script against it, checking all four tables for backfill gaps, id/key mismatches, and unresolvable orphans:
    • Zero unbackfilled rows outside the documented pre-existing-orphan case (buckets removed from a policy before the migration ever ran) — orphan rate well under 1% on every table, matching Convert bucket_key/requested_bucket_key to real foreign keys #11871's stated known limitation.
    • Zero id/key mismatches anywhere.
    • Confirmed live post-deploy signups have bucket_id set 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.
  • Applied and tested the migration itself locally: migrates and rolls back cleanly against the current schema, relevant model/service/GraphQL/notifier/presenter tests (125 tests) pass against the new schema, and confirmed no application code still references the raw legacy columns (only the computed bucket_key/requested_bucket_key reader methods and the unrelated registration_policy_buckets.key column, both of which are intentionally kept).

Fixes #11872

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
app/javascript/setupI18Next.ts 🟠 65.52% 🟠 72.41% 🟢 6.89%
Overall Coverage 🟢 55.88% 🟢 55.89% 🟢 0.01%

Minimum allowed coverage is 0%, this run produced 55.89%

@nbudin
nbudin merged commit 5a848c0 into main Aug 5, 2026
25 checks passed
@nbudin
nbudin deleted the 11872-drop-legacy-bucket-key-columns branch August 5, 2026 19:22
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.

Drop legacy bucket_key/requested_bucket_key columns after #11871 backfill is verified in production

1 participant