chore(db): drop the outbound_number compat view (migration 039)#950
chore(db): drop the outbound_number compat view (migration 039)#950swaroopvarma1 wants to merge 1 commit into
Conversation
Migration 038 renamed outbound_number -> telephony_numbers and left an updatable compatibility view under the old name as rolling-deploy / rollback insurance. The rename deployed to prod on 2026-07-22 and all pods run post-rename code; no live code references the old relation (verified: only historical migrations and Plivo payload dict keys match). Applied and verified on the local database: view dropped, table intact. Prod apply happens via scripts/migrate.py on explicit ops word, as usual. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughMigration 039 documents the completed rollback-insurance window and conditionally drops the legacy ChangesOutbound number view removal
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Tara-ag
left a comment
There was a problem hiding this comment.
Review Summary
Files reviewed: 1 (app/database/migrations/039_drop_outbound_number_compat_view.sql)
New issues raised: 0
Decision: Approve ✅
Notes
- This PR correctly adds a new sequential migration (
039_*) rather than editing the existing038_rename_outbound_number_to_telephony_numbers.sql, satisfying the append-only migration rule. - The single statement
DROP VIEW IF EXISTS outbound_number;is idempotent and safe for environments where the view may not exist. - Cross-checked the repo for live SQL references to the bare
outbound_numberrelation: only historical migration files, wire-visible column names, and Plivo payload dict keys remain. No active queries target the view being dropped. - Migration 038’s compatibility view was explicitly documented as temporary and scheduled for removal once pre-rename pods were cycled out.
No blocking or non-blocking issues found. Safe to merge.
What
One migration, one statement:
DROP VIEW IF EXISTS outbound_number;Why
Migration 038 (PR #934) renamed
outbound_number→telephony_numbersand left an updatable compatibility VIEW under the old name so pods still running pre-rename code kept working during the rolling deploy. That deploy completed 2026-07-22; every pod has been on post-rename code since, and no rollback is contemplated. The view's insurance window is over.Safety checks done
outbound_numberrelation (FROM|JOIN|UPDATE|INTO|TABLE|VIEW outbound_number): only historical migration files (never re-run) and Plivo request payload dict keys match. No live SQL touches the view.telephony_numberstable and row count intact,migrate.py statusclean.IF EXISTSguard makes the migration idempotent and safe on environments where the view was never created.Wire-visible column names (
template.outbound_number_id,lead_call_tracker.outbound_number_id) are untouched — they retire via the dual-field API window (separate PR).Prod
After merge, prod apply is the usual
scripts/migrate.pyrun during the next release — no data movement, metadata-only drop.🤖 Generated with Claude Code
Summary by CodeRabbit