fix(db): restore prod-applied orphan migrations into repo history - #2762
Conversation
These five migrations were pushed to production under local timestamps that never landed in git. Restoring the exact SQL from schema_migrations keeps local/remote history aligned, and reorders the never-pushed native_packages audit fix after the prod slim migration so fresh resets stay correct. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe pull request updates Supabase migration and lint safeguards, replaces reclaim cleanup and cron execution logic, refines encrypted bundle validation, and evolves audit-trigger filtering, actor attribution, and payload storage. ChangesSupabase runtime and migration safeguards
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Cron as process_all_cron_tasks
participant Tasks as cron_tasks
participant Queue as pgmq
participant FunctionQueue as process_function_queue
Cron->>Tasks: Read enabled scheduled tasks
Cron->>Queue: Dispatch queue tasks
Cron->>FunctionQueue: Process function queues
Cron->>Cron: Release advisory lock
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
Permit restoring the five prod-applied orphan migrations by exact blob hash when timestamps sort before main tip, and treat db lint --fail-on warning as error-only so CLI 2.109 plpgsql_check noise on STABLE auth helpers does not block CI. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e7cddc0e-1281-4f79-9308-b247caae6e86) |
There was a problem hiding this comment.
Risk: high. Cursor Bugbot did not complete (check skipped; usage limit reached), so the automated review signal is unavailable. Restoring production-applied database migrations exceeds the low-risk approval threshold; human review is required and I did not approve.
Sent by Cursor Approval Agent: Pull Request Approver External





Summary (AI generated)
schema_migrations(never committed under those version IDs):20260725111831_fix_reclaim_no_timeout_max_work20260725111921_fix_reclaim_encrypt_trigger_guc20260725111931_fix_reclaim_cron_catch_canceled20260725162854_skip_audit_dual_storage_manifest_count20260725182614_slim_audit_logs_skip_bookkeepingsupabase_migrations.schema_migrations.statements(exact applied content).20260725163259_slim_audit_logs_skip_bookkeeping→20260725190000_slim_audit_logs_keep_native_packages_auditableso freshdb resetapplies the native_packages audit fix after prod's82614slim migration.Motivation (AI generated)
supabase db pushfailed because remote history had version IDs missing from git. Marking themrevertedwould have been wrong: the SQL is already live. Restoring the files keeps history honest and unblocks deploy of pending local migrations.Business Impact (AI generated)
Unblocks production DB deploys without rewriting applied reclaim/audit fixes. Pending local migrations (billing period stats cron, weekly stats window, app create storage RLS, native_packages audit fix) can be pushed after merge.
Test Plan (AI generated)
supabase migration listshows the five restored versions present on both local and remotebunx supabase db push(applies local-only pending migrations; does not re-run the five restored ones)20260725163259, repair that version (bunx supabase migration repair --status reverted 20260725163259) then reset/push as neededaudit_log_triggerstill keepsnative_packageschanges auditable after the pending190000migration appliesGenerated with AI
Made with Cursor
Summary by CodeRabbit
Reliability
Security
Audit Logs
Maintenance