Repository navigation
fix(db): define the legacy purge without running it - #78
Conversation
The legacy cleanup migration deleted legacy results, chats, flowcharts, sparring rounds and sources the moment it was applied. Production never applied it, and the pins migration that follows it is blocked behind it. Adam decided on 2026-09-30 to keep production's legacy material. The migration now only defines private.purge_legacy_debate_material, so db push is safe on every project. Running the purge is a separate call that needs explicit authorization. The pgTAP tests still call the function directly, so its behavior stays covered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@coderabbitai full review |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe migration defines the legacy purge function without invoking it. Applying the migration no longer deletes legacy rows. The README documents that a remote purge requires a separate, explicitly authorized call and retains the documented deletion criteria. ChangesLegacy cleanup
Estimated code review effort: 2 (Simple) | ~8 minutes Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing. Comment |
|
|
@coderabbitai review |
|
Outcome
20260926090100_legacy_debate_cleanup.sqlnow definesprivate.purge_legacy_debate_materialbut no longer calls it. Applying the migration deletes nothing, sosupabase db pushis safe on production and staging.Why
Production never applied this migration. Because migrations apply in order, it also blocked
20260927170000_debate_context_pins.sql. Vercel already serves the pins UI frommain, but production has nodebate_context_pinstable, so those requests fail withPGRST205.Adam decided on 2026-09-30 to keep production's legacy material. Legacy rows stay in the Unsorted view. The purge is still available as a separate, explicitly authorized call. The migration header shows the exact statement.
Changes
SELECT private.purge_legacy_debate_material(...)call. The function body, the revokes and the pgTAP coverage are unchanged.supabase/README.mddescribes the migration as non-destructive and says the purge needs separate authorization.Verification
./.superset/db-gate.sh: see the comment below.🤖 Generated with Claude Code
Summary by CodeRabbit