Skip to content

chore(db): squash Supabase migrations#2459

Open
riderx wants to merge 1 commit into
mainfrom
codex/squash-supabase-migrations
Open

chore(db): squash Supabase migrations#2459
riderx wants to merge 1 commit into
mainfrom
codex/squash-supabase-migrations

Conversation

@riderx

@riderx riderx commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary (AI-generated)

Compressed the Supabase migration history into a single baseline migration at 20260608143906_fix_manifest_update_rls_policy.sql and removed the older migration files.

The squashed baseline preserves the generated schema plus non-schema migration state that Supabase squash omits, including PGMQ queues, cron task rows, RBAC static metadata, credit step fixtures, cron scheduling, and ACL parity. It also adds a documented repair script for existing databases.

Motivation (AI-generated)

The migration directory had accumulated a long historical chain. Keeping a single baseline simplifies local resets, schema review, and future migration maintenance while retaining a repair path for databases that already have the old history recorded.

Business Impact (AI-generated)

This is internal database-maintenance work. New environments initialize from one baseline migration.

For production or any database that is already up to date with 20260608143906, the documented repair command does not apply schema SQL. It only removes the deleted historical version rows from supabase_migrations.schema_migrations and keeps 20260608143906 marked as applied:

bash scripts/repair-supabase-squashed-baseline.sh --linked

For an older database that has not applied 20260608143906, the same script first applies the idempotent pre-squash repair SQL, then compacts migration history.

Test Plan (AI-generated)

  • bash -n scripts/repair-supabase-squashed-baseline.sh
  • bash scripts/check-supabase-migration-order.sh
  • git diff --check
  • bun lint
  • bun run cli:typecheck
  • bun run typecheck:backend
  • bun run typecheck:frontend
  • bun run supabase:db:reset applied only 20260608143906_fix_manifest_update_rls_policy.sql
  • SUPABASE_WORKDIR=... bash scripts/repair-supabase-squashed-baseline.sh --local on an already-current DB printed Squashed baseline 20260608143906 is already marked applied; skipping schema repair SQL.
  • Local query confirmed supabase_migrations.schema_migrations contains only 20260608143906
  • bun scripts/supabase-worktree.ts migration up reported Local database is up to date.
  • bun scripts/supabase-worktree.ts test db passed: 77 files, 1109 tests

Summary by CodeRabbit

  • Documentation

    • Added a migration repair guide explaining the squashed baseline workflow and upgrade steps.
  • Chores

    • Consolidated many DB migrations into a single squashed baseline to simplify deployments.
    • Added a migration repair utility and CI step to help clean up historical migrations during upgrades.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@riderx, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 42 minutes and 32 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 68c019ed-8a4c-4133-ac89-c3e4ad0cff2c

📥 Commits

Reviewing files that changed from the base of the PR and between e1a5e7c and 24b8a53.

📒 Files selected for processing (300)
  • .github/workflows/build_and_deploy.yml
  • scripts/check-supabase-migration-order.sh
  • scripts/repair-supabase-squashed-baseline.sh
  • scripts/supabase-worktree.ts
  • supabase/migration_guide.md
  • supabase/migrations/20250530233128_base.sql
  • supabase/migrations/20250601115144_better_queue_logs.sql
  • supabase/migrations/20250605151648_credits.sql
  • supabase/migrations/20250608130257_fix_version_meta.sql
  • supabase/migrations/20250612131646_exist_app.sql
  • supabase/migrations/20250613034031_tmp_users_table.sql
  • supabase/migrations/20250619221552_global_stats.sql
  • supabase/migrations/20250714021423_manifest_perf.sql
  • supabase/migrations/20250903010822_consolidated_org_apikey_migrations.sql
  • supabase/migrations/20250908120000_pg_log_and_rls_logging.sql
  • supabase/migrations/20250909094709_better_account_delete.sql
  • supabase/migrations/20250913161225_lint_warning_fixes_followup.sql
  • supabase/migrations/20250916032824_fix_retention.sql
  • supabase/migrations/20250920120000_remove_legal_and_update_notification_defaults.sql
  • supabase/migrations/20250920120001_remove_old_version_meta.sql
  • supabase/migrations/20250921120000_device_version_name.sql
  • supabase/migrations/20250927082020_better_app_metrics.sql
  • supabase/migrations/20250928145642_orgs_last_stats_updated.sql
  • supabase/migrations/20251007132214_global_stats_registers_storage.sql
  • supabase/migrations/20251007134349_cron_plan_from_stats_backend.sql
  • supabase/migrations/20251014105957_rename_plan_cron.sql
  • supabase/migrations/20251014120000_add_batch_size_to_process_function_queue.sql
  • supabase/migrations/20251014135440_add_cron_sync_sub.sql
  • supabase/migrations/20251019123107_fix_stats.sql
  • supabase/migrations/20251021141631_add_usage_credit_system.sql
  • supabase/migrations/20251024153920_update_capgo_credits_steps_org.sql
  • supabase/migrations/20251024230753_fix_org_delete_cascade.sql
  • supabase/migrations/20251026165357_add_missing_queue_cron_jobs.sql
  • supabase/migrations/20251031202034_fix_usage_credit_rls.sql
  • supabase/migrations/20251103134045_add_download_stats_actions.sql
  • supabase/migrations/20251106024103_add_default_channel_to_devices.sql
  • supabase/migrations/20251107001223_channel_device_counts.sql
  • supabase/migrations/20251107153019_manifest_bundle_counts.sql
  • supabase/migrations/20251113041643_transfer_ownership_before_user_deletion.sql
  • supabase/migrations/20251113140646_consolidate_cron_job.sql
  • supabase/migrations/20251119001844_add_missing_foreign_key_indexes.sql
  • supabase/migrations/20251119001847_add_native_build_system.sql
  • supabase/migrations/20251120150750_simplify_manifest_bundle_counts.sql
  • supabase/migrations/20251204163538_drop_plans_overage_columns.sql
  • supabase/migrations/20251208175306_fix_user_delete_old_record.sql
  • supabase/migrations/20251209184322_add_top_up_credits_system.sql
  • supabase/migrations/20251212112948_add_expose_metadata_to_apps.sql
  • supabase/migrations/20251213114641_add_revenue_metrics_to_global_stats.sql
  • supabase/migrations/20251213140000_add_encryption_tracking_to_devices.sql
  • supabase/migrations/20251219192610_add_cli_version_to_app_versions.sql
  • supabase/migrations/20251220011455_optimize_is_good_plan_v5_org.sql
  • supabase/migrations/20251221091510_fix_lint_indexes.sql
  • supabase/migrations/20251222140030_rbac_system.sql
  • supabase/migrations/20251223234326_fix_duplicate_overage_tracking.sql
  • supabase/migrations/20251224103713_2fa_enforcement.sql
  • supabase/migrations/20251226120000_add_channel_allow_device_prod.sql
  • supabase/migrations/20251226121000_add_channel_stats_actions.sql
  • supabase/migrations/20251226125240_audit_log.sql
  • supabase/migrations/20251227040840_add_production_deploy_install_stats_email.sql
  • supabase/migrations/20251228033417_webhooks.sql
  • supabase/migrations/20251228063320_fix_audit_log_apikey.sql
  • supabase/migrations/20251228065406_user_email_preferences.sql
  • supabase/migrations/20251228080032_hashed_api_keys.sql
  • supabase/migrations/20251228080037_apikey_expiration.sql
  • supabase/migrations/20251228082157_add_apikey_policy_to_get_orgs.sql
  • supabase/migrations/20251228100000_password_policy_enforcement.sql
  • supabase/migrations/20251228150000_reject_access_due_to_2fa_for_app.sql
  • supabase/migrations/20251228160000_get_org_members_apikey_support.sql
  • supabase/migrations/20251228215402_add_orphan_images_cleanup.sql
  • supabase/migrations/20251229030503_add_cron_tasks_rls_policy.sql
  • supabase/migrations/20251229100000_fix_check_org_members_password_policy_service_role.sql
  • supabase/migrations/20251229233706_replace_uuid_generate_v4_with_gen_random_uuid.sql
  • supabase/migrations/20251230114041_reject_access_due_to_2fa_for_org.sql
  • supabase/migrations/20251231060433_add_billing_period_stats_email.sql
  • supabase/migrations/20260101042511_enforce_encrypted_bundles.sql
  • supabase/migrations/20260102120000_fix_get_org_members_include_tmp_users.sql
  • supabase/migrations/20260102140000_fix_get_identity_hashed_apikeys.sql
  • supabase/migrations/20260103030451_add_advisory_lock_to_cron.sql
  • supabase/migrations/20260104100000_add_allow_preview_to_apps.sql
  • supabase/migrations/20260104110000_add_apikey_policy_to_get_orgs_v7.sql
  • supabase/migrations/20260104120000_revoke_process_function_queue_public_access.sql
  • supabase/migrations/20260105014309_remove_metered.sql
  • supabase/migrations/20260105150626_fix_is_allowed_capgkey_hashed_apikeys.sql
  • supabase/migrations/20260107000000_add_anon_role_to_webhooks_rls.sql
  • supabase/migrations/20260108000000_add_electron_platform.sql
  • supabase/migrations/20260108024031_add_devices_platform_columns.sql
  • supabase/migrations/20260109000000_fix_build_system_rls_consistency.sql
  • supabase/migrations/20260109000001_remove_both_platform_option.sql
  • supabase/migrations/20260110044840_improve_usage_credit_rls.sql
  • supabase/migrations/20260112140000_cleanup_old_channel_devices.sql
  • supabase/migrations/20260113000000_add_plugin_breakdown_to_global_stats.sql
  • supabase/migrations/20260113132114_missing_index.sql
  • supabase/migrations/20260113160650_delete_old_deleted_versions.sql
  • supabase/migrations/20260114214731_add_deleted_at_column.sql
  • supabase/migrations/20260115025158_add_daily_fail_ratio_email.sql
  • supabase/migrations/20260115051444_sync_stripe_info_on_org_create.sql
  • supabase/migrations/20260118000000_add_build_stats_to_global_stats.sql
  • supabase/migrations/20260118005052_version_usage_use_version_name.sql
  • supabase/migrations/20260119182934_add_use_new_rbac_to_get_orgs_v7.sql
  • supabase/migrations/20260120165047_rbac_invites.sql
  • supabase/migrations/20260121000000_add_demo_app_support.sql
  • supabase/migrations/20260123140712_fix_rbac_perf_security.sql
  • supabase/migrations/20260124231940_fix_multiple_permissive_policies.sql
  • supabase/migrations/20260125151000_mau_first_seen_device_usage.sql
  • supabase/migrations/20260127120000_enforce_2fa_in_permission_checks.sql
  • supabase/migrations/20260127121000_allow_credits_without_plan.sql
  • supabase/migrations/20260127153000_require_recent_reauth_for_delete_user.sql
  • supabase/migrations/20260127232000_sanitize_text_fields.sql
  • supabase/migrations/20260129120000_fix_reject_access_due_to_2fa_for_app.sql
  • supabase/migrations/20260129123000_fix_is_bundle_encrypted_empty.sql
  • supabase/migrations/20260130032543_allow_org_logo_images.sql
  • supabase/migrations/20260130033703_private_images_bucket.sql
  • supabase/migrations/20260130040811_allow_org_logo_upload.sql
  • supabase/migrations/20260130190800_update_invite_expiry_on_resend.sql
  • supabase/migrations/20260201015640_add_upgrade_org_stats.sql
  • supabase/migrations/20260201042609_fix_password_policy_org_read_gate.sql
  • supabase/migrations/20260202090000_add_cli_realtime_feed_pref.sql
  • supabase/migrations/20260203010025_add_build_success_stats.sql
  • supabase/migrations/20260203120000_optimize_org_metrics_cache.sql
  • supabase/migrations/20260203140000_security_hardening.sql
  • supabase/migrations/20260203150000_fix_get_user_main_org_id_by_app_id_seed.sql
  • supabase/migrations/20260203160000_optimize_audit_logs_rls.sql
  • supabase/migrations/20260203173000_get_account_removal_date_auth.sql
  • supabase/migrations/20260203190000_check_min_rights_apikey_scope.sql
  • supabase/migrations/20260203201308_rbac_org_member_no_app_access.sql
  • supabase/migrations/20260204100000_restore_audit_logs_apikey.sql
  • supabase/migrations/20260204103000_mfa_email_otp_guard.sql
  • supabase/migrations/20260204103001_enable_security_settings_rls.sql
  • supabase/migrations/20260204181424_add_channel_permission_overrides.sql
  • supabase/migrations/20260205031305_mfa_email_otp_hardening.sql
  • supabase/migrations/20260205120000_fix_audit_logs_select_rls.sql
  • supabase/migrations/20260206120000_apikey_server_generation.sql
  • supabase/migrations/20260206213247_org_has_usage_credits_flag.sql
  • supabase/migrations/20260207180640_tmp_users_cleanup_7_days.sql
  • supabase/migrations/20260209014020_user_created_via_invite.sql
  • supabase/migrations/20260209024134_remove_exceeded_flags_functions.sql
  • supabase/migrations/20260210132811_stats_customid_guard.sql
  • supabase/migrations/20260211034517_add_demo_apps_created_to_global_stats.sql
  • supabase/migrations/20260214054927_restore_top_up_usage_credits_for_service_role.sql
  • supabase/migrations/20260216102420_add_build_status_reconciliation_cron.sql
  • supabase/migrations/20260221150207_fix_role_bindings_rls_update_insert.sql
  • supabase/migrations/20260223000001_add_sso_providers.sql
  • supabase/migrations/20260224091500_fix_get_orgs_v6_access_controls.sql
  • supabase/migrations/20260224093000_fix_get_total_metrics_auth.sql
  • supabase/migrations/20260224153000_add_org_conversion_rate_to_global_stats.sql
  • supabase/migrations/20260224153100_fix_org_member_rpc_access.sql
  • supabase/migrations/20260224153200_fix_webhook_rls_org_scoping.sql
  • supabase/migrations/20260224153201_revoke_record_email_otp_verified_auth_role.sql
  • supabase/migrations/20260224153300_add_created_at_to_get_orgs_v7.sql
  • supabase/migrations/20260224153401_fix_transfer_app_security.sql
  • supabase/migrations/20260224153500_restrict_rpc_api_key_oracles.sql
  • supabase/migrations/20260224160000_fix_find_apikey_rpc_permissions.sql
  • supabase/migrations/20260225000000_image_metadata_cleanup_triggers.sql
  • supabase/migrations/20260225000100_atomic_demo_app_creation.sql
  • supabase/migrations/20260225105000_exist_app_v2_apikey_auth.sql
  • supabase/migrations/20260225120000_restrict_webhooks_select_for_admin_only.sql
  • supabase/migrations/20260226000000_org_rls_require_self_2fa_update.sql
  • supabase/migrations/20260226000100_fix_org_rls_2fa_function_permissions.sql
  • supabase/migrations/20260226090000_require_verified_email_for_delete_user.sql
  • supabase/migrations/20260226153000_restrict_apikey_oracle_rpcs.sql
  • supabase/migrations/20260227000000_fix_rescind_invitation_rpc_access.sql
  • supabase/migrations/20260227000001_secure_record_build_time_rpc.sql
  • supabase/migrations/20260227010000_restrict_upsert_version_meta_exec.sql
  • supabase/migrations/20260227150000_fix_invite_user_to_org_security.sql
  • supabase/migrations/20260228000000_role_bindings_rls_assignable.sql
  • supabase/migrations/20260228000100_delete_member_cascade_bindings.sql
  • supabase/migrations/20260228000200_prevent_last_super_admin_delete.sql
  • supabase/migrations/20260228000300_fix_apikey_hashed_lookup.sql
  • supabase/migrations/20260228154639_fix_check_domain_sso_security.sql
  • supabase/migrations/20260228172308_fix_prevent_last_super_admin_cascade.sql
  • supabase/migrations/20260228172309_fix_rbac_test_compatibility.sql
  • supabase/migrations/20260302000000_rbac_default_for_new_orgs.sql
  • supabase/migrations/20260302185011_fix_rbac_check_effective_user.sql
  • supabase/migrations/20260303150634_sso_per_org_feature_flag.sql
  • supabase/migrations/20260308121758_fix_get_app_global_metrics_rbac.sql
  • supabase/migrations/20260308121933_restrict_global_stats_access.sql
  • supabase/migrations/20260308203352_restrict-org-status-rpc-access.sql
  • supabase/migrations/20260311120000_allow_shared_public_images.sql
  • supabase/migrations/20260311123000_fix_rbac_has_permission_preserve_org_for_new_app.sql
  • supabase/migrations/20260311124500_fix_get_org_perm_for_apikey_rbac.sql
  • supabase/migrations/20260311150453_secure_sso_enforcement_lookup.sql
  • supabase/migrations/20260311162400_sync_org_user_delete_role_bindings.sql
  • supabase/migrations/20260311164503_split_is_admin_platform_admin_and_rls.sql
  • supabase/migrations/20260312000000_remove_rbac_security_settings_singletons.sql
  • supabase/migrations/20260312183000_normalize_sso_provider_domain_lowercase.sql
  • supabase/migrations/20260312202155_hardening_get_identity_apikey_only_rpcs.sql
  • supabase/migrations/20260312202212_fix_rescind_invitation_rpc_access_hardening.sql
  • supabase/migrations/20260312202227_fix_rbac_org_user_access_null_auth_gate.sql
  • supabase/migrations/20260312202250_cli_created_record_build_time_public_revoke_fix.sql
  • supabase/migrations/20260313104400_fix_get_current_plan_max_org_access_cli.sql
  • supabase/migrations/20260313104427_webhook-api-key-org-scope-cli.sql
  • supabase/migrations/20260313121928_fix-onboarding-needed-org-nonexistent.sql
  • supabase/migrations/20260313130044_harden_upsert_version_meta_authz.sql
  • supabase/migrations/20260316132841_move_mfa_email_otp_trigger_to_public.sql
  • supabase/migrations/20260316220423_harden_plan_usage_org_rpc_access.sql
  • supabase/migrations/20260317020451_secure_remaining_helper_rpcs.sql
  • supabase/migrations/20260317020500_revoke_cleanup_expired_demo_apps_public_exec.sql
  • supabase/migrations/20260317021715_fix_get_user_org_ids_apikey_expiry.sql
  • supabase/migrations/20260317040310_restrict_manifest_read_access.sql
  • supabase/migrations/20260317090000_fix_get_app_versions_rbac.sql
  • supabase/migrations/20260317100429_fix_encrypted_bundle_update_enforcement.sql
  • supabase/migrations/20260317160518_sso_skip_org_on_sso_domain.sql
  • supabase/migrations/20260318210857_fix_get_orgs_v7_private_overload_grants.sql
  • supabase/migrations/20260318220337_optimize-org-metrics-cache-read-only.sql
  • supabase/migrations/20260319090430_password_policy_max_length_72.sql
  • supabase/migrations/20260319094649_add_build_minutes_to_global_stats.sql
  • supabase/migrations/20260319103952_fix_subkey_header_and_plan_usage_rpcs.sql
  • supabase/migrations/20260319155734_fix_global_stats_build_seconds_and_conversion_rate.sql
  • supabase/migrations/20260319164053_fix_manifest_select_rls.sql
  • supabase/migrations/20260319221428_onboarding_app_flags.sql
  • supabase/migrations/20260319235626_disable_auto_org_on_user_create.sql
  • supabase/migrations/20260320044548_add_org_website.sql
  • supabase/migrations/20260320133752_app_demo_flag_cleanup.sql
  • supabase/migrations/20260323075628_fix_rbac_admin_rpc_execute_grants.sql
  • supabase/migrations/20260324181219_fix_process_cron_stats_activity.sql
  • supabase/migrations/20260324181246_add_paid_at_for_admin_revenue_metrics.sql
  • supabase/migrations/20260325032835_optimize_webhooks_rls_auth_eval.sql
  • supabase/migrations/20260325043000_harden_cron_stats_queue_followup.sql
  • supabase/migrations/20260325045835_split_channel_permission_overrides_write_policies.sql
  • supabase/migrations/20260327044102_fix_cron_sync_sub_queue_payload.sql
  • supabase/migrations/20260327210500_app_scoped_metrics_rbac.sql
  • supabase/migrations/20260327220305_add_webhook_queues_to_cron_tasks.sql
  • supabase/migrations/20260330141128_stripe_customer_country.sql
  • supabase/migrations/20260408134842_adjust_build_time_credit_pricing.sql
  • supabase/migrations/20260408140215_fix_org_metrics_cache_delete_cascade.sql
  • supabase/migrations/20260422104849_stale_chart_refresh_state.sql
  • supabase/migrations/20260422203355_add_admin_retention_metrics.sql
  • supabase/migrations/20260424090111_fix_rbac_scope_mismatch_escalation.sql
  • supabase/migrations/20260424090125_protect_owner_org_transfer_path.sql
  • supabase/migrations/20260424090727_block_apikey_channel_updates.sql
  • supabase/migrations/20260424090854_enforce_public_channel_uniqueness.sql
  • supabase/migrations/20260424090941_fix_transfer_app_deploy_history_owner_org.sql
  • supabase/migrations/20260424091645_enforce_hashed_api_keys_on_rls_identity_path.sql
  • supabase/migrations/20260424094101_enforce_apikey_scope_in_rbac_check.sql
  • supabase/migrations/20260424094225_harden_role_bindings_cross_org_scope.sql
  • supabase/migrations/20260427092702_fix_transfer_app_guard_allowlist.sql
  • supabase/migrations/20260427105151_harden_security_definer_execute_grants.sql
  • supabase/migrations/20260427105817_restrict_is_paying_and_good_plan_org_action_access.sql
  • supabase/migrations/20260427105834_restrict_manifest_mutation_access.sql
  • supabase/migrations/20260427105838_enforce_apikey_expiration_policy.sql
  • supabase/migrations/20260427105909_fix_apikey_helper_rpc_public_execute.sql
  • supabase/migrations/20260427110612_retention_metrics_service_role_rls.sql
  • supabase/migrations/20260427142358_require_recent_email_otp_for_delete_user.sql
  • supabase/migrations/20260427144300_rbac_apikey_bindings_priority.sql
  • supabase/migrations/20260427144323_cli_rbac_permission_wrappers.sql
  • supabase/migrations/20260427144324_add_org_create_app_permission.sql
  • supabase/migrations/20260427144325_fix_helper_rpc_request_role_and_admin_grants.sql
  • supabase/migrations/20260427144331_restore_rbac_apikey_mismatch_and_bindings_priority.sql
  • supabase/migrations/20260427175506_temporary_cli_apps_list_anon_helper_grants.sql
  • supabase/migrations/20260429094653_restore_deleted_account_recovery.sql
  • supabase/migrations/20260429135552_enable_rbac_all_orgs.sql
  • supabase/migrations/20260430145247_validate_org_security_settings.sql
  • supabase/migrations/20260430145518_enforce_check_min_rights_app_org_scope.sql
  • supabase/migrations/20260501162433_fix_storage_cleanup_counts.sql
  • supabase/migrations/20260501200000_remove_sso_enabled_flag.sql
  • supabase/migrations/20260502134045_fix_audit_logs_anon_dos.sql
  • supabase/migrations/20260502134234_prevent_last_super_admin_demotion.sql
  • supabase/migrations/20260502134355_fix_rbac_role_binding_demoted_super_admin.sql
  • supabase/migrations/20260504174812_fix_build_time_daily_aggregation.sql
  • supabase/migrations/20260505163356_apikey_nullable_mode_with_bindings.sql
  • supabase/migrations/20260505193449_harden_encrypted_bundle_update_invariant.sql
  • supabase/migrations/20260506101503_add_churn_revenue_plan_breakdown.sql
  • supabase/migrations/20260506103727_add_plugin_version_ladder_to_global_stats.sql
  • supabase/migrations/20260506152006_native_version_usage_chart.sql
  • supabase/migrations/20260507082135_active_usage_credits_flag.sql
  • supabase/migrations/20260507090047_fix_app_versions_anon_dos.sql
  • supabase/migrations/20260507090436_fix_apikey_rbac_rpc_oracle_and_expiration_scope.sql
  • supabase/migrations/20260507091347_secure_exist_app_versions_rpc.sql
  • supabase/migrations/20260507153639_fast_app_versions_select_policy.sql
  • supabase/migrations/20260507165636_fast_usage_credit_rls_policies.sql
  • supabase/migrations/20260508122137_fix_app_versions_trigger_owner_org.sql
  • supabase/migrations/20260508135918_enforce_channel_promotion_permission.sql
  • supabase/migrations/20260510103516_stats_health_events_metadata.sql
  • supabase/migrations/20260510161104_build_timeout_seconds.sql
  • supabase/migrations/20260510171814_native_build_concurrency_plan_limit.sql
  • supabase/migrations/20260510183000_add_build_runner_wait_seconds.sql
  • supabase/migrations/20260510190432_fix_apikey_rbac_password_policy_gate.sql
  • supabase/migrations/20260510191550_add_paid_product_activity_to_global_stats.sql
  • supabase/migrations/20260510214140_org_initial_plan_solo_mau_limit.sql
  • supabase/migrations/20260510214806_add_plan_conversion_rates_to_global_stats.sql
  • supabase/migrations/20260510235542_add_plan_total_conversion_rate.sql
  • supabase/migrations/20260511101826_add_ltv_global_stats.sql
  • supabase/migrations/20260511151503_fix_get_organization_cli_warnings_rbac.sql
  • supabase/migrations/20260513000348_add_audit_log_retention_cron.sql
  • supabase/migrations/20260513152636_replace_manifest_cleanup_index.sql
  • supabase/migrations/20260514093535_app_versions_r2_path_index.sql
  • supabase/migrations/20260514102952_enforce_90_day_deleted_versions_cleanup.sql
  • supabase/migrations/20260515170516_drop_redundant_channel_devices_unique_constraint.sql
  • supabase/migrations/20260516151507_fix_cli_warnings_app_scoped_apikeys.sql
  • supabase/migrations/20260517102815_enforce_webhook_created_by.sql
  • supabase/migrations/20260518120000_add_ai_analyzed_to_build_requests.sql
  • supabase/migrations/20260518121000_standard_webhook_secrets.sql
  • supabase/migrations/20260518130000_plan_check_passthrough_appid.sql
  • supabase/migrations/20260518131054_complete_onboarding_after_first_upload.sql
  • supabase/migrations/20260519065534_revert_complete_onboarding_after_first_upload_trigger.sql
  • supabase/migrations/20260519123613_safe_demo_data_reset.sql
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/migrations/20260521210531_cron_hyperping_healthchecks.sql
  • supabase/migrations/20260524123635_drop_channel_devices_owner_org_index.sql
  • supabase/migrations/20260526133000_migrate_apikeys_to_v2_timestamp_fix.sql
📝 Walkthrough

Walkthrough

Adds guarded migration-order validation for a squashed baseline, a repair script and docs/workflow wiring to apply it, updates the audit trigger to resolve API-key identity, and removes conditional download-related enum additions.

Changes

Migration Baseline Squash and Repair

Layer / File(s) Summary
Migration order validation and squash logic
scripts/check-supabase-migration-order.sh
Adds count_nonempty_lines, computes current_migration_files via find+sort, and implements conditional logic to permit a full baseline squash only when no added files exist, exactly one current migration remains that was rewritten relative to base_ref, and its timestamp matches the latest baseline; otherwise rejects deletions and reports them.
Squashed-baseline repair script
scripts/repair-supabase-squashed-baseline.sh
New script: strict Bash mode, CLI parsing (`--linked
CI step, worktree, and migration guide
.github/workflows/build_and_deploy.yml, scripts/supabase-worktree.ts, supabase/migration_guide.md
Adds a workflow step to run the repair script (--linked), includes repair in per-worktree Supabase symlinks, and documents the “Squashed Baseline Repair” flow and commands (--linked / --db-url).
Audit trigger: API-key identity support
supabase/migrations/20251228063320_fix_audit_log_apikey.sql
Redefines public.audit_log_trigger() to derive acting user via public.get_identity(...::public.key_mode[]), skip inserts when no identity, skip orgs DELETE events, compute changed_fields by diffing OLD/NEW JSONB on UPDATE, derive org/record ids by TG_TABLE_NAME, and insert into public.audit_logs only when the org exists.
Download stats enum removals
supabase/migrations/20251103134045_add_download_stats_actions.sql
Removes the SQL statements that would have added multiple download-related action values to the public.stats_action enum.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Cap-go/capgo#1970: Also updates scripts/check-supabase-migration-order.sh and migration-order validation rules.
  • Cap-go/capgo#2343: Overlaps with migration-order enforcement changes and special-case allowance logic.

@codspeed-hq

codspeed-hq Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing codex/squash-supabase-migrations (b5da889) with main (50ddacf)2

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (631f63b) during the generation of this report, so 50ddacf was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@riderx riderx marked this pull request as ready for review June 8, 2026 14:03
@coderabbitai coderabbitai Bot added the codex label Jun 8, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

CREATE TYPE "public"."action_type" AS ENUM (

P1 Badge Keep the squashed baseline from running on upgraded databases

If any existing Supabase environment has already applied the deleted migrations but has not recorded version 20260608111805 yet, the CLI will treat this rewritten file as the next pending migration and execute the full baseline against an existing schema. That fails immediately on non-idempotent statements such as this CREATE TYPE because public.action_type already exists, so those environments cannot deploy the compatibility-events change. Keep the per-change delta as a separate pending migration or add an explicit repair/mark-applied path for existing databases before replacing it with a baseline.


if [[ -z "$deleted_latest_or_newer_files" ]]; then
allow_full_squash=1

P2 Badge Require the remaining baseline to be rewritten

The new squash allowance only checks that one migration file remains and that deleted files are older than the base timestamp; it does not verify that the remaining file was actually replaced with a full baseline. A future PR that accidentally deletes every older migration while leaving the latest small delta unchanged would pass this check, leaving fresh databases with only that delta and none of the schema. Include a check that the surviving migration is modified/replaced as part of the squash before setting allow_full_squash=1.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@riderx riderx force-pushed the codex/squash-supabase-migrations branch from f9e73e4 to 0e3859c Compare June 8, 2026 14:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e3859cce3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread supabase/migration_guide.md Outdated
@riderx riderx force-pushed the codex/squash-supabase-migrations branch from 0e3859c to 2ed08d9 Compare June 8, 2026 14:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ed08d9f87

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread supabase/migration_guide.md Outdated
@riderx riderx force-pushed the codex/squash-supabase-migrations branch from 2ed08d9 to 4b7d9d3 Compare June 8, 2026 14:46
@riderx riderx force-pushed the codex/squash-supabase-migrations branch from 4b7d9d3 to 3e2ded4 Compare June 8, 2026 16:41
@riderx riderx marked this pull request as draft June 8, 2026 16:42
coderabbitai[bot]
coderabbitai Bot previously requested changes Jun 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/repair-supabase-squashed-baseline.sh`:
- Line 86: In baseline_is_applied in
scripts/repair-supabase-squashed-baseline.sh the grep against applied_output
only matches '"applied": true' and will miss compact JSON like '"applied":true';
update the check to accept optional whitespace (e.g. use a regex like
'"applied":\s*true' with grep -P or grep -E) or, even better, parse
applied_output with jq to read .applied (using applied_output and the
baseline_is_applied check) and use that boolean to decide if the baseline is
applied.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: faba99a0-7d6a-4258-836e-b4271abb9535

📥 Commits

Reviewing files that changed from the base of the PR and between 0e3859c and 3e2ded4.

📒 Files selected for processing (295)
  • scripts/check-supabase-migration-order.sh
  • scripts/repair-supabase-squashed-baseline.sh
  • scripts/supabase-worktree.ts
  • supabase/migration_guide.md
  • supabase/migrations/20250530233128_base.sql
  • supabase/migrations/20250601115144_better_queue_logs.sql
  • supabase/migrations/20250605151648_credits.sql
  • supabase/migrations/20250608130257_fix_version_meta.sql
  • supabase/migrations/20250612131646_exist_app.sql
  • supabase/migrations/20250613034031_tmp_users_table.sql
  • supabase/migrations/20250619221552_global_stats.sql
  • supabase/migrations/20250714021423_manifest_perf.sql
  • supabase/migrations/20250903010822_consolidated_org_apikey_migrations.sql
  • supabase/migrations/20250908120000_pg_log_and_rls_logging.sql
  • supabase/migrations/20250909094709_better_account_delete.sql
  • supabase/migrations/20250913161225_lint_warning_fixes_followup.sql
  • supabase/migrations/20250916032824_fix_retention.sql
  • supabase/migrations/20250920120000_remove_legal_and_update_notification_defaults.sql
  • supabase/migrations/20250920120001_remove_old_version_meta.sql
  • supabase/migrations/20250921120000_device_version_name.sql
  • supabase/migrations/20250927082020_better_app_metrics.sql
  • supabase/migrations/20250928145642_orgs_last_stats_updated.sql
  • supabase/migrations/20251007132214_global_stats_registers_storage.sql
  • supabase/migrations/20251007134349_cron_plan_from_stats_backend.sql
  • supabase/migrations/20251014105957_rename_plan_cron.sql
  • supabase/migrations/20251014120000_add_batch_size_to_process_function_queue.sql
  • supabase/migrations/20251014135440_add_cron_sync_sub.sql
  • supabase/migrations/20251019123107_fix_stats.sql
  • supabase/migrations/20251021141631_add_usage_credit_system.sql
  • supabase/migrations/20251024153920_update_capgo_credits_steps_org.sql
  • supabase/migrations/20251024230753_fix_org_delete_cascade.sql
  • supabase/migrations/20251026165357_add_missing_queue_cron_jobs.sql
  • supabase/migrations/20251031202034_fix_usage_credit_rls.sql
  • supabase/migrations/20251103134045_add_download_stats_actions.sql
  • supabase/migrations/20251106024103_add_default_channel_to_devices.sql
  • supabase/migrations/20251107001223_channel_device_counts.sql
  • supabase/migrations/20251107153019_manifest_bundle_counts.sql
  • supabase/migrations/20251113041643_transfer_ownership_before_user_deletion.sql
  • supabase/migrations/20251113140646_consolidate_cron_job.sql
  • supabase/migrations/20251119001844_add_missing_foreign_key_indexes.sql
  • supabase/migrations/20251119001847_add_native_build_system.sql
  • supabase/migrations/20251120150750_simplify_manifest_bundle_counts.sql
  • supabase/migrations/20251204163538_drop_plans_overage_columns.sql
  • supabase/migrations/20251208175306_fix_user_delete_old_record.sql
  • supabase/migrations/20251209184322_add_top_up_credits_system.sql
  • supabase/migrations/20251212112948_add_expose_metadata_to_apps.sql
  • supabase/migrations/20251213114641_add_revenue_metrics_to_global_stats.sql
  • supabase/migrations/20251213140000_add_encryption_tracking_to_devices.sql
  • supabase/migrations/20251219192610_add_cli_version_to_app_versions.sql
  • supabase/migrations/20251220011455_optimize_is_good_plan_v5_org.sql
  • supabase/migrations/20251221091510_fix_lint_indexes.sql
  • supabase/migrations/20251222140030_rbac_system.sql
  • supabase/migrations/20251223234326_fix_duplicate_overage_tracking.sql
  • supabase/migrations/20251224103713_2fa_enforcement.sql
  • supabase/migrations/20251226120000_add_channel_allow_device_prod.sql
  • supabase/migrations/20251226121000_add_channel_stats_actions.sql
  • supabase/migrations/20251226125240_audit_log.sql
  • supabase/migrations/20251227040840_add_production_deploy_install_stats_email.sql
  • supabase/migrations/20251228033417_webhooks.sql
  • supabase/migrations/20251228063320_fix_audit_log_apikey.sql
  • supabase/migrations/20251228065406_user_email_preferences.sql
  • supabase/migrations/20251228080032_hashed_api_keys.sql
  • supabase/migrations/20251228080037_apikey_expiration.sql
  • supabase/migrations/20251228082157_add_apikey_policy_to_get_orgs.sql
  • supabase/migrations/20251228100000_password_policy_enforcement.sql
  • supabase/migrations/20251228150000_reject_access_due_to_2fa_for_app.sql
  • supabase/migrations/20251228160000_get_org_members_apikey_support.sql
  • supabase/migrations/20251228215402_add_orphan_images_cleanup.sql
  • supabase/migrations/20251229030503_add_cron_tasks_rls_policy.sql
  • supabase/migrations/20251229100000_fix_check_org_members_password_policy_service_role.sql
  • supabase/migrations/20251229233706_replace_uuid_generate_v4_with_gen_random_uuid.sql
  • supabase/migrations/20251230114041_reject_access_due_to_2fa_for_org.sql
  • supabase/migrations/20251231060433_add_billing_period_stats_email.sql
  • supabase/migrations/20260101042511_enforce_encrypted_bundles.sql
  • supabase/migrations/20260102120000_fix_get_org_members_include_tmp_users.sql
  • supabase/migrations/20260102140000_fix_get_identity_hashed_apikeys.sql
  • supabase/migrations/20260103030451_add_advisory_lock_to_cron.sql
  • supabase/migrations/20260104100000_add_allow_preview_to_apps.sql
  • supabase/migrations/20260104110000_add_apikey_policy_to_get_orgs_v7.sql
  • supabase/migrations/20260104120000_revoke_process_function_queue_public_access.sql
  • supabase/migrations/20260105014309_remove_metered.sql
  • supabase/migrations/20260105150626_fix_is_allowed_capgkey_hashed_apikeys.sql
  • supabase/migrations/20260107000000_add_anon_role_to_webhooks_rls.sql
  • supabase/migrations/20260108000000_add_electron_platform.sql
  • supabase/migrations/20260108024031_add_devices_platform_columns.sql
  • supabase/migrations/20260109000000_fix_build_system_rls_consistency.sql
  • supabase/migrations/20260109000001_remove_both_platform_option.sql
  • supabase/migrations/20260110044840_improve_usage_credit_rls.sql
  • supabase/migrations/20260112140000_cleanup_old_channel_devices.sql
  • supabase/migrations/20260113000000_add_plugin_breakdown_to_global_stats.sql
  • supabase/migrations/20260113132114_missing_index.sql
  • supabase/migrations/20260113160650_delete_old_deleted_versions.sql
  • supabase/migrations/20260114214731_add_deleted_at_column.sql
  • supabase/migrations/20260115025158_add_daily_fail_ratio_email.sql
  • supabase/migrations/20260115051444_sync_stripe_info_on_org_create.sql
  • supabase/migrations/20260118000000_add_build_stats_to_global_stats.sql
  • supabase/migrations/20260118005052_version_usage_use_version_name.sql
  • supabase/migrations/20260119182934_add_use_new_rbac_to_get_orgs_v7.sql
  • supabase/migrations/20260120165047_rbac_invites.sql
  • supabase/migrations/20260121000000_add_demo_app_support.sql
  • supabase/migrations/20260123140712_fix_rbac_perf_security.sql
  • supabase/migrations/20260124231940_fix_multiple_permissive_policies.sql
  • supabase/migrations/20260125151000_mau_first_seen_device_usage.sql
  • supabase/migrations/20260127120000_enforce_2fa_in_permission_checks.sql
  • supabase/migrations/20260127121000_allow_credits_without_plan.sql
  • supabase/migrations/20260127153000_require_recent_reauth_for_delete_user.sql
  • supabase/migrations/20260127232000_sanitize_text_fields.sql
  • supabase/migrations/20260129120000_fix_reject_access_due_to_2fa_for_app.sql
  • supabase/migrations/20260129123000_fix_is_bundle_encrypted_empty.sql
  • supabase/migrations/20260130032543_allow_org_logo_images.sql
  • supabase/migrations/20260130033703_private_images_bucket.sql
  • supabase/migrations/20260130040811_allow_org_logo_upload.sql
  • supabase/migrations/20260130190800_update_invite_expiry_on_resend.sql
  • supabase/migrations/20260201015640_add_upgrade_org_stats.sql
  • supabase/migrations/20260201042609_fix_password_policy_org_read_gate.sql
  • supabase/migrations/20260202090000_add_cli_realtime_feed_pref.sql
  • supabase/migrations/20260203010025_add_build_success_stats.sql
  • supabase/migrations/20260203120000_optimize_org_metrics_cache.sql
  • supabase/migrations/20260203140000_security_hardening.sql
  • supabase/migrations/20260203150000_fix_get_user_main_org_id_by_app_id_seed.sql
  • supabase/migrations/20260203160000_optimize_audit_logs_rls.sql
  • supabase/migrations/20260203173000_get_account_removal_date_auth.sql
  • supabase/migrations/20260203190000_check_min_rights_apikey_scope.sql
  • supabase/migrations/20260203201308_rbac_org_member_no_app_access.sql
  • supabase/migrations/20260204100000_restore_audit_logs_apikey.sql
  • supabase/migrations/20260204103000_mfa_email_otp_guard.sql
  • supabase/migrations/20260204103001_enable_security_settings_rls.sql
  • supabase/migrations/20260204181424_add_channel_permission_overrides.sql
  • supabase/migrations/20260205031305_mfa_email_otp_hardening.sql
  • supabase/migrations/20260205120000_fix_audit_logs_select_rls.sql
  • supabase/migrations/20260206120000_apikey_server_generation.sql
  • supabase/migrations/20260206213247_org_has_usage_credits_flag.sql
  • supabase/migrations/20260207180640_tmp_users_cleanup_7_days.sql
  • supabase/migrations/20260209014020_user_created_via_invite.sql
  • supabase/migrations/20260209024134_remove_exceeded_flags_functions.sql
  • supabase/migrations/20260210132811_stats_customid_guard.sql
  • supabase/migrations/20260211034517_add_demo_apps_created_to_global_stats.sql
  • supabase/migrations/20260214054927_restore_top_up_usage_credits_for_service_role.sql
  • supabase/migrations/20260216102420_add_build_status_reconciliation_cron.sql
  • supabase/migrations/20260221150207_fix_role_bindings_rls_update_insert.sql
  • supabase/migrations/20260223000001_add_sso_providers.sql
  • supabase/migrations/20260224091500_fix_get_orgs_v6_access_controls.sql
  • supabase/migrations/20260224093000_fix_get_total_metrics_auth.sql
  • supabase/migrations/20260224153000_add_org_conversion_rate_to_global_stats.sql
  • supabase/migrations/20260224153100_fix_org_member_rpc_access.sql
  • supabase/migrations/20260224153200_fix_webhook_rls_org_scoping.sql
  • supabase/migrations/20260224153201_revoke_record_email_otp_verified_auth_role.sql
  • supabase/migrations/20260224153300_add_created_at_to_get_orgs_v7.sql
  • supabase/migrations/20260224153401_fix_transfer_app_security.sql
  • supabase/migrations/20260224153500_restrict_rpc_api_key_oracles.sql
  • supabase/migrations/20260224160000_fix_find_apikey_rpc_permissions.sql
  • supabase/migrations/20260225000000_image_metadata_cleanup_triggers.sql
  • supabase/migrations/20260225000100_atomic_demo_app_creation.sql
  • supabase/migrations/20260225105000_exist_app_v2_apikey_auth.sql
  • supabase/migrations/20260225120000_restrict_webhooks_select_for_admin_only.sql
  • supabase/migrations/20260226000000_org_rls_require_self_2fa_update.sql
  • supabase/migrations/20260226000100_fix_org_rls_2fa_function_permissions.sql
  • supabase/migrations/20260226090000_require_verified_email_for_delete_user.sql
  • supabase/migrations/20260226153000_restrict_apikey_oracle_rpcs.sql
  • supabase/migrations/20260227000000_fix_rescind_invitation_rpc_access.sql
  • supabase/migrations/20260227000001_secure_record_build_time_rpc.sql
  • supabase/migrations/20260227010000_restrict_upsert_version_meta_exec.sql
  • supabase/migrations/20260227150000_fix_invite_user_to_org_security.sql
  • supabase/migrations/20260228000000_role_bindings_rls_assignable.sql
  • supabase/migrations/20260228000100_delete_member_cascade_bindings.sql
  • supabase/migrations/20260228000200_prevent_last_super_admin_delete.sql
  • supabase/migrations/20260228000300_fix_apikey_hashed_lookup.sql
  • supabase/migrations/20260228154639_fix_check_domain_sso_security.sql
  • supabase/migrations/20260228172308_fix_prevent_last_super_admin_cascade.sql
  • supabase/migrations/20260228172309_fix_rbac_test_compatibility.sql
  • supabase/migrations/20260302000000_rbac_default_for_new_orgs.sql
  • supabase/migrations/20260302185011_fix_rbac_check_effective_user.sql
  • supabase/migrations/20260303150634_sso_per_org_feature_flag.sql
  • supabase/migrations/20260308121758_fix_get_app_global_metrics_rbac.sql
  • supabase/migrations/20260308121933_restrict_global_stats_access.sql
  • supabase/migrations/20260308203352_restrict-org-status-rpc-access.sql
  • supabase/migrations/20260311120000_allow_shared_public_images.sql
  • supabase/migrations/20260311123000_fix_rbac_has_permission_preserve_org_for_new_app.sql
  • supabase/migrations/20260311124500_fix_get_org_perm_for_apikey_rbac.sql
  • supabase/migrations/20260311150453_secure_sso_enforcement_lookup.sql
  • supabase/migrations/20260311162400_sync_org_user_delete_role_bindings.sql
  • supabase/migrations/20260311164503_split_is_admin_platform_admin_and_rls.sql
  • supabase/migrations/20260312000000_remove_rbac_security_settings_singletons.sql
  • supabase/migrations/20260312183000_normalize_sso_provider_domain_lowercase.sql
  • supabase/migrations/20260312202155_hardening_get_identity_apikey_only_rpcs.sql
  • supabase/migrations/20260312202212_fix_rescind_invitation_rpc_access_hardening.sql
  • supabase/migrations/20260312202227_fix_rbac_org_user_access_null_auth_gate.sql
  • supabase/migrations/20260312202250_cli_created_record_build_time_public_revoke_fix.sql
  • supabase/migrations/20260313104400_fix_get_current_plan_max_org_access_cli.sql
  • supabase/migrations/20260313104427_webhook-api-key-org-scope-cli.sql
  • supabase/migrations/20260313121928_fix-onboarding-needed-org-nonexistent.sql
  • supabase/migrations/20260313130044_harden_upsert_version_meta_authz.sql
  • supabase/migrations/20260316132841_move_mfa_email_otp_trigger_to_public.sql
  • supabase/migrations/20260316220423_harden_plan_usage_org_rpc_access.sql
  • supabase/migrations/20260317020451_secure_remaining_helper_rpcs.sql
  • supabase/migrations/20260317020500_revoke_cleanup_expired_demo_apps_public_exec.sql
  • supabase/migrations/20260317021715_fix_get_user_org_ids_apikey_expiry.sql
  • supabase/migrations/20260317040310_restrict_manifest_read_access.sql
  • supabase/migrations/20260317090000_fix_get_app_versions_rbac.sql
  • supabase/migrations/20260317100429_fix_encrypted_bundle_update_enforcement.sql
  • supabase/migrations/20260317160518_sso_skip_org_on_sso_domain.sql
  • supabase/migrations/20260318210857_fix_get_orgs_v7_private_overload_grants.sql
  • supabase/migrations/20260318220337_optimize-org-metrics-cache-read-only.sql
  • supabase/migrations/20260319090430_password_policy_max_length_72.sql
  • supabase/migrations/20260319094649_add_build_minutes_to_global_stats.sql
  • supabase/migrations/20260319103952_fix_subkey_header_and_plan_usage_rpcs.sql
  • supabase/migrations/20260319155734_fix_global_stats_build_seconds_and_conversion_rate.sql
  • supabase/migrations/20260319164053_fix_manifest_select_rls.sql
  • supabase/migrations/20260319221428_onboarding_app_flags.sql
  • supabase/migrations/20260319235626_disable_auto_org_on_user_create.sql
  • supabase/migrations/20260320044548_add_org_website.sql
  • supabase/migrations/20260320133752_app_demo_flag_cleanup.sql
  • supabase/migrations/20260323075628_fix_rbac_admin_rpc_execute_grants.sql
  • supabase/migrations/20260324181219_fix_process_cron_stats_activity.sql
  • supabase/migrations/20260324181246_add_paid_at_for_admin_revenue_metrics.sql
  • supabase/migrations/20260325032835_optimize_webhooks_rls_auth_eval.sql
  • supabase/migrations/20260325043000_harden_cron_stats_queue_followup.sql
  • supabase/migrations/20260325045835_split_channel_permission_overrides_write_policies.sql
  • supabase/migrations/20260327044102_fix_cron_sync_sub_queue_payload.sql
  • supabase/migrations/20260327210500_app_scoped_metrics_rbac.sql
  • supabase/migrations/20260327220305_add_webhook_queues_to_cron_tasks.sql
  • supabase/migrations/20260330141128_stripe_customer_country.sql
  • supabase/migrations/20260408134842_adjust_build_time_credit_pricing.sql
  • supabase/migrations/20260408140215_fix_org_metrics_cache_delete_cascade.sql
  • supabase/migrations/20260422104849_stale_chart_refresh_state.sql
  • supabase/migrations/20260422203355_add_admin_retention_metrics.sql
  • supabase/migrations/20260424090111_fix_rbac_scope_mismatch_escalation.sql
  • supabase/migrations/20260424090125_protect_owner_org_transfer_path.sql
  • supabase/migrations/20260424090727_block_apikey_channel_updates.sql
  • supabase/migrations/20260424090854_enforce_public_channel_uniqueness.sql
  • supabase/migrations/20260424090941_fix_transfer_app_deploy_history_owner_org.sql
  • supabase/migrations/20260424091645_enforce_hashed_api_keys_on_rls_identity_path.sql
  • supabase/migrations/20260424094101_enforce_apikey_scope_in_rbac_check.sql
  • supabase/migrations/20260424094225_harden_role_bindings_cross_org_scope.sql
  • supabase/migrations/20260427092702_fix_transfer_app_guard_allowlist.sql
  • supabase/migrations/20260427105151_harden_security_definer_execute_grants.sql
  • supabase/migrations/20260427105817_restrict_is_paying_and_good_plan_org_action_access.sql
  • supabase/migrations/20260427105834_restrict_manifest_mutation_access.sql
  • supabase/migrations/20260427105838_enforce_apikey_expiration_policy.sql
  • supabase/migrations/20260427105909_fix_apikey_helper_rpc_public_execute.sql
  • supabase/migrations/20260427110612_retention_metrics_service_role_rls.sql
  • supabase/migrations/20260427142358_require_recent_email_otp_for_delete_user.sql
  • supabase/migrations/20260427144300_rbac_apikey_bindings_priority.sql
  • supabase/migrations/20260427144323_cli_rbac_permission_wrappers.sql
  • supabase/migrations/20260427144324_add_org_create_app_permission.sql
  • supabase/migrations/20260427144325_fix_helper_rpc_request_role_and_admin_grants.sql
  • supabase/migrations/20260427144331_restore_rbac_apikey_mismatch_and_bindings_priority.sql
  • supabase/migrations/20260427175506_temporary_cli_apps_list_anon_helper_grants.sql
  • supabase/migrations/20260429094653_restore_deleted_account_recovery.sql
  • supabase/migrations/20260429135552_enable_rbac_all_orgs.sql
  • supabase/migrations/20260430145247_validate_org_security_settings.sql
  • supabase/migrations/20260430145518_enforce_check_min_rights_app_org_scope.sql
  • supabase/migrations/20260501162433_fix_storage_cleanup_counts.sql
  • supabase/migrations/20260501200000_remove_sso_enabled_flag.sql
  • supabase/migrations/20260502134045_fix_audit_logs_anon_dos.sql
  • supabase/migrations/20260502134234_prevent_last_super_admin_demotion.sql
  • supabase/migrations/20260502134355_fix_rbac_role_binding_demoted_super_admin.sql
  • supabase/migrations/20260504174812_fix_build_time_daily_aggregation.sql
  • supabase/migrations/20260505163356_apikey_nullable_mode_with_bindings.sql
  • supabase/migrations/20260505193449_harden_encrypted_bundle_update_invariant.sql
  • supabase/migrations/20260506101503_add_churn_revenue_plan_breakdown.sql
  • supabase/migrations/20260506103727_add_plugin_version_ladder_to_global_stats.sql
  • supabase/migrations/20260506152006_native_version_usage_chart.sql
  • supabase/migrations/20260507082135_active_usage_credits_flag.sql
  • supabase/migrations/20260507090047_fix_app_versions_anon_dos.sql
  • supabase/migrations/20260507090436_fix_apikey_rbac_rpc_oracle_and_expiration_scope.sql
  • supabase/migrations/20260507091347_secure_exist_app_versions_rpc.sql
  • supabase/migrations/20260507153639_fast_app_versions_select_policy.sql
  • supabase/migrations/20260507165636_fast_usage_credit_rls_policies.sql
  • supabase/migrations/20260508122137_fix_app_versions_trigger_owner_org.sql
  • supabase/migrations/20260508135918_enforce_channel_promotion_permission.sql
  • supabase/migrations/20260510103516_stats_health_events_metadata.sql
  • supabase/migrations/20260510161104_build_timeout_seconds.sql
  • supabase/migrations/20260510171814_native_build_concurrency_plan_limit.sql
  • supabase/migrations/20260510183000_add_build_runner_wait_seconds.sql
  • supabase/migrations/20260510190432_fix_apikey_rbac_password_policy_gate.sql
  • supabase/migrations/20260510191550_add_paid_product_activity_to_global_stats.sql
  • supabase/migrations/20260510214140_org_initial_plan_solo_mau_limit.sql
  • supabase/migrations/20260510214806_add_plan_conversion_rates_to_global_stats.sql
  • supabase/migrations/20260510235542_add_plan_total_conversion_rate.sql
  • supabase/migrations/20260511101826_add_ltv_global_stats.sql
  • supabase/migrations/20260511151503_fix_get_organization_cli_warnings_rbac.sql
  • supabase/migrations/20260513000348_add_audit_log_retention_cron.sql
  • supabase/migrations/20260513152636_replace_manifest_cleanup_index.sql
  • supabase/migrations/20260514093535_app_versions_r2_path_index.sql
  • supabase/migrations/20260514102952_enforce_90_day_deleted_versions_cleanup.sql
  • supabase/migrations/20260515170516_drop_redundant_channel_devices_unique_constraint.sql
  • supabase/migrations/20260516151507_fix_cli_warnings_app_scoped_apikeys.sql
  • supabase/migrations/20260517102815_enforce_webhook_created_by.sql
  • supabase/migrations/20260518120000_add_ai_analyzed_to_build_requests.sql
  • supabase/migrations/20260518121000_standard_webhook_secrets.sql
  • supabase/migrations/20260518130000_plan_check_passthrough_appid.sql
  • supabase/migrations/20260518131054_complete_onboarding_after_first_upload.sql
  • supabase/migrations/20260519065534_revert_complete_onboarding_after_first_upload_trigger.sql
  • supabase/migrations/20260519123613_safe_demo_data_reset.sql
💤 Files with no reviewable changes (100)
  • supabase/migrations/20260113132114_missing_index.sql
  • supabase/migrations/20250714021423_manifest_perf.sql
  • supabase/migrations/20251226120000_add_channel_allow_device_prod.sql
  • supabase/migrations/20251119001844_add_missing_foreign_key_indexes.sql
  • supabase/migrations/20250920120000_remove_legal_and_update_notification_defaults.sql
  • supabase/migrations/20250619221552_global_stats.sql
  • supabase/migrations/20260103030451_add_advisory_lock_to_cron.sql
  • supabase/migrations/20251228160000_get_org_members_apikey_support.sql
  • supabase/migrations/20260110044840_improve_usage_credit_rls.sql
  • supabase/migrations/20251213140000_add_encryption_tracking_to_devices.sql
  • supabase/migrations/20251106024103_add_default_channel_to_devices.sql
  • supabase/migrations/20251014120000_add_batch_size_to_process_function_queue.sql
  • supabase/migrations/20251230114041_reject_access_due_to_2fa_for_org.sql
  • supabase/migrations/20260104100000_add_allow_preview_to_apps.sql
  • supabase/migrations/20251228150000_reject_access_due_to_2fa_for_app.sql
  • supabase/migrations/20260109000000_fix_build_system_rls_consistency.sql
  • supabase/migrations/20251107001223_channel_device_counts.sql
  • supabase/migrations/20250601115144_better_queue_logs.sql
  • supabase/migrations/20251228065406_user_email_preferences.sql
  • supabase/migrations/20251019123107_fix_stats.sql
  • supabase/migrations/20260124231940_fix_multiple_permissive_policies.sql
  • supabase/migrations/20251113041643_transfer_ownership_before_user_deletion.sql
  • supabase/migrations/20260109000001_remove_both_platform_option.sql
  • supabase/migrations/20260115025158_add_daily_fail_ratio_email.sql
  • supabase/migrations/20251014135440_add_cron_sync_sub.sql
  • supabase/migrations/20260107000000_add_anon_role_to_webhooks_rls.sql
  • supabase/migrations/20260112140000_cleanup_old_channel_devices.sql
  • supabase/migrations/20251213114641_add_revenue_metrics_to_global_stats.sql
  • supabase/migrations/20251204163538_drop_plans_overage_columns.sql
  • supabase/migrations/20250903010822_consolidated_org_apikey_migrations.sql
  • supabase/migrations/20251014105957_rename_plan_cron.sql
  • supabase/migrations/20260121000000_add_demo_app_support.sql
  • supabase/migrations/20260108024031_add_devices_platform_columns.sql
  • supabase/migrations/20251229100000_fix_check_org_members_password_policy_service_role.sql
  • supabase/migrations/20250921120000_device_version_name.sql
  • supabase/migrations/20250608130257_fix_version_meta.sql
  • supabase/migrations/20251228215402_add_orphan_images_cleanup.sql
  • supabase/migrations/20250605151648_credits.sql
  • supabase/migrations/20260127120000_enforce_2fa_in_permission_checks.sql
  • supabase/migrations/20251024153920_update_capgo_credits_steps_org.sql
  • supabase/migrations/20260105014309_remove_metered.sql
  • supabase/migrations/20260127153000_require_recent_reauth_for_delete_user.sql
  • supabase/migrations/20260127121000_allow_credits_without_plan.sql
  • supabase/migrations/20260104110000_add_apikey_policy_to_get_orgs_v7.sql
  • supabase/migrations/20250920120001_remove_old_version_meta.sql
  • supabase/migrations/20251024230753_fix_org_delete_cascade.sql
  • supabase/migrations/20251229233706_replace_uuid_generate_v4_with_gen_random_uuid.sql
  • supabase/migrations/20260113000000_add_plugin_breakdown_to_global_stats.sql
  • supabase/migrations/20251219192610_add_cli_version_to_app_versions.sql
  • supabase/migrations/20251007132214_global_stats_registers_storage.sql
  • supabase/migrations/20251103134045_add_download_stats_actions.sql
  • supabase/migrations/20251228082157_add_apikey_policy_to_get_orgs.sql
  • supabase/migrations/20251223234326_fix_duplicate_overage_tracking.sql
  • supabase/migrations/20251221091510_fix_lint_indexes.sql
  • supabase/migrations/20260118000000_add_build_stats_to_global_stats.sql
  • supabase/migrations/20250909094709_better_account_delete.sql
  • supabase/migrations/20250613034031_tmp_users_table.sql
  • supabase/migrations/20260108000000_add_electron_platform.sql
  • supabase/migrations/20251212112948_add_expose_metadata_to_apps.sql
  • supabase/migrations/20251228080032_hashed_api_keys.sql
  • supabase/migrations/20251026165357_add_missing_queue_cron_jobs.sql
  • supabase/migrations/20260114214731_add_deleted_at_column.sql
  • supabase/migrations/20250612131646_exist_app.sql
  • supabase/migrations/20251208175306_fix_user_delete_old_record.sql
  • supabase/migrations/20260125151000_mau_first_seen_device_usage.sql
  • supabase/migrations/20251107153019_manifest_bundle_counts.sql
  • supabase/migrations/20260119182934_add_use_new_rbac_to_get_orgs_v7.sql
  • supabase/migrations/20250928145642_orgs_last_stats_updated.sql
  • supabase/migrations/20251226121000_add_channel_stats_actions.sql
  • supabase/migrations/20251226125240_audit_log.sql
  • supabase/migrations/20250913161225_lint_warning_fixes_followup.sql
  • supabase/migrations/20251209184322_add_top_up_credits_system.sql
  • supabase/migrations/20260113160650_delete_old_deleted_versions.sql
  • supabase/migrations/20251031202034_fix_usage_credit_rls.sql
  • supabase/migrations/20260115051444_sync_stripe_info_on_org_create.sql
  • supabase/migrations/20250927082020_better_app_metrics.sql
  • supabase/migrations/20260104120000_revoke_process_function_queue_public_access.sql
  • supabase/migrations/20251227040840_add_production_deploy_install_stats_email.sql
  • supabase/migrations/20251228033417_webhooks.sql
  • supabase/migrations/20251229030503_add_cron_tasks_rls_policy.sql
  • supabase/migrations/20251021141631_add_usage_credit_system.sql
  • supabase/migrations/20251120150750_simplify_manifest_bundle_counts.sql
  • supabase/migrations/20251228080037_apikey_expiration.sql
  • supabase/migrations/20260120165047_rbac_invites.sql
  • supabase/migrations/20260102120000_fix_get_org_members_include_tmp_users.sql
  • supabase/migrations/20250916032824_fix_retention.sql
  • supabase/migrations/20251007134349_cron_plan_from_stats_backend.sql
  • supabase/migrations/20251228100000_password_policy_enforcement.sql
  • supabase/migrations/20251231060433_add_billing_period_stats_email.sql
  • supabase/migrations/20260123140712_fix_rbac_perf_security.sql
  • supabase/migrations/20251224103713_2fa_enforcement.sql
  • supabase/migrations/20251113140646_consolidate_cron_job.sql
  • supabase/migrations/20260118005052_version_usage_use_version_name.sql
  • supabase/migrations/20251220011455_optimize_is_good_plan_v5_org.sql
  • supabase/migrations/20260102140000_fix_get_identity_hashed_apikeys.sql
  • supabase/migrations/20251228063320_fix_audit_log_apikey.sql
  • supabase/migrations/20260105150626_fix_is_allowed_capgkey_hashed_apikeys.sql
  • supabase/migrations/20251119001847_add_native_build_system.sql
  • supabase/migrations/20260101042511_enforce_encrypted_bundles.sql
  • supabase/migrations/20250908120000_pg_log_and_rls_logging.sql

Comment thread scripts/repair-supabase-squashed-baseline.sh Outdated
@riderx riderx marked this pull request as ready for review June 8, 2026 16:49
@riderx riderx force-pushed the codex/squash-supabase-migrations branch from 3e2ded4 to f043986 Compare June 8, 2026 16:51
@riderx riderx dismissed coderabbitai[bot]’s stale review June 8, 2026 17:00

Addressed in f043986; CodeRabbit thread is resolved and CI is green.

@riderx riderx force-pushed the codex/squash-supabase-migrations branch from f043986 to 0bfab73 Compare June 8, 2026 17:05
@socket-security

socket-security Bot commented Jun 8, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @supabase/supabase-js is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: cli/package.jsonnpm/@supabase/supabase-js@2.107.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@supabase/supabase-js@2.107.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm @typescript-eslint/eslint-plugin is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?npm/@antfu/eslint-config@9.0.0npm/@typescript-eslint/eslint-plugin@8.60.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript-eslint/eslint-plugin@8.60.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm @zip.js/zip.js is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?npm/@capgo/capacitor-zip@8.1.10npm/@zip.js/zip.js@2.8.26

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@zip.js/zip.js@2.8.26. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bfab73888

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/repair-supabase-squashed-baseline.sh Outdated
@riderx riderx force-pushed the codex/squash-supabase-migrations branch from 0bfab73 to e1a5e7c Compare June 8, 2026 17:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1a5e7c60e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/repair-supabase-squashed-baseline.sh Outdated
coderabbitai[bot]
coderabbitai Bot previously requested changes Jun 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/repair-supabase-squashed-baseline.sh`:
- Around line 60-70: The script reads versions into the reverted_versions array
from reverted_versions_file but doesn't abort when that array ends up empty (or
only comments), which later produces invalid SQL; after the while loop that
populates reverted_versions (referencing reverted_versions_file and
reverted_versions) add an explicit guard that checks if reverted_versions has
zero elements and, if so, emit a clear error to stderr and exit non‑zero before
proceeding to the SQL construction that uses reverted_versions.
- Around line 72-77: The run_supabase function should prefer the locally
installed supabase binary on PATH and fall back to bunx supabase; change the
logic in run_supabase to first check command -v supabase >/dev/null 2>&1 and, if
found, invoke supabase "$@" (adding --workdir "$SUPABASE_WORKDIR" when
SUPABASE_WORKDIR is set), otherwise invoke bunx supabase "$@" (also with
--workdir when SUPABASE_WORKDIR is set); update both the branch that handles
SUPABASE_WORKDIR and the else branch so the binary selection is used
consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6b0f148f-f9e0-4829-8280-840b272ca45e

📥 Commits

Reviewing files that changed from the base of the PR and between 3e2ded4 and e1a5e7c.

📒 Files selected for processing (300)
  • .github/workflows/build_and_deploy.yml
  • scripts/check-supabase-migration-order.sh
  • scripts/repair-supabase-squashed-baseline.sh
  • scripts/supabase-worktree.ts
  • supabase/migration_guide.md
  • supabase/migrations/20250530233128_base.sql
  • supabase/migrations/20250601115144_better_queue_logs.sql
  • supabase/migrations/20250605151648_credits.sql
  • supabase/migrations/20250608130257_fix_version_meta.sql
  • supabase/migrations/20250612131646_exist_app.sql
  • supabase/migrations/20250613034031_tmp_users_table.sql
  • supabase/migrations/20250619221552_global_stats.sql
  • supabase/migrations/20250714021423_manifest_perf.sql
  • supabase/migrations/20250903010822_consolidated_org_apikey_migrations.sql
  • supabase/migrations/20250908120000_pg_log_and_rls_logging.sql
  • supabase/migrations/20250909094709_better_account_delete.sql
  • supabase/migrations/20250913161225_lint_warning_fixes_followup.sql
  • supabase/migrations/20250916032824_fix_retention.sql
  • supabase/migrations/20250920120000_remove_legal_and_update_notification_defaults.sql
  • supabase/migrations/20250920120001_remove_old_version_meta.sql
  • supabase/migrations/20250921120000_device_version_name.sql
  • supabase/migrations/20250927082020_better_app_metrics.sql
  • supabase/migrations/20250928145642_orgs_last_stats_updated.sql
  • supabase/migrations/20251007132214_global_stats_registers_storage.sql
  • supabase/migrations/20251007134349_cron_plan_from_stats_backend.sql
  • supabase/migrations/20251014105957_rename_plan_cron.sql
  • supabase/migrations/20251014120000_add_batch_size_to_process_function_queue.sql
  • supabase/migrations/20251014135440_add_cron_sync_sub.sql
  • supabase/migrations/20251019123107_fix_stats.sql
  • supabase/migrations/20251021141631_add_usage_credit_system.sql
  • supabase/migrations/20251024153920_update_capgo_credits_steps_org.sql
  • supabase/migrations/20251024230753_fix_org_delete_cascade.sql
  • supabase/migrations/20251026165357_add_missing_queue_cron_jobs.sql
  • supabase/migrations/20251031202034_fix_usage_credit_rls.sql
  • supabase/migrations/20251103134045_add_download_stats_actions.sql
  • supabase/migrations/20251106024103_add_default_channel_to_devices.sql
  • supabase/migrations/20251107001223_channel_device_counts.sql
  • supabase/migrations/20251107153019_manifest_bundle_counts.sql
  • supabase/migrations/20251113041643_transfer_ownership_before_user_deletion.sql
  • supabase/migrations/20251113140646_consolidate_cron_job.sql
  • supabase/migrations/20251119001844_add_missing_foreign_key_indexes.sql
  • supabase/migrations/20251119001847_add_native_build_system.sql
  • supabase/migrations/20251120150750_simplify_manifest_bundle_counts.sql
  • supabase/migrations/20251204163538_drop_plans_overage_columns.sql
  • supabase/migrations/20251208175306_fix_user_delete_old_record.sql
  • supabase/migrations/20251209184322_add_top_up_credits_system.sql
  • supabase/migrations/20251212112948_add_expose_metadata_to_apps.sql
  • supabase/migrations/20251213114641_add_revenue_metrics_to_global_stats.sql
  • supabase/migrations/20251213140000_add_encryption_tracking_to_devices.sql
  • supabase/migrations/20251219192610_add_cli_version_to_app_versions.sql
  • supabase/migrations/20251220011455_optimize_is_good_plan_v5_org.sql
  • supabase/migrations/20251221091510_fix_lint_indexes.sql
  • supabase/migrations/20251222140030_rbac_system.sql
  • supabase/migrations/20251223234326_fix_duplicate_overage_tracking.sql
  • supabase/migrations/20251224103713_2fa_enforcement.sql
  • supabase/migrations/20251226120000_add_channel_allow_device_prod.sql
  • supabase/migrations/20251226121000_add_channel_stats_actions.sql
  • supabase/migrations/20251226125240_audit_log.sql
  • supabase/migrations/20251227040840_add_production_deploy_install_stats_email.sql
  • supabase/migrations/20251228033417_webhooks.sql
  • supabase/migrations/20251228063320_fix_audit_log_apikey.sql
  • supabase/migrations/20251228065406_user_email_preferences.sql
  • supabase/migrations/20251228080032_hashed_api_keys.sql
  • supabase/migrations/20251228080037_apikey_expiration.sql
  • supabase/migrations/20251228082157_add_apikey_policy_to_get_orgs.sql
  • supabase/migrations/20251228100000_password_policy_enforcement.sql
  • supabase/migrations/20251228150000_reject_access_due_to_2fa_for_app.sql
  • supabase/migrations/20251228160000_get_org_members_apikey_support.sql
  • supabase/migrations/20251228215402_add_orphan_images_cleanup.sql
  • supabase/migrations/20251229030503_add_cron_tasks_rls_policy.sql
  • supabase/migrations/20251229100000_fix_check_org_members_password_policy_service_role.sql
  • supabase/migrations/20251229233706_replace_uuid_generate_v4_with_gen_random_uuid.sql
  • supabase/migrations/20251230114041_reject_access_due_to_2fa_for_org.sql
  • supabase/migrations/20251231060433_add_billing_period_stats_email.sql
  • supabase/migrations/20260101042511_enforce_encrypted_bundles.sql
  • supabase/migrations/20260102120000_fix_get_org_members_include_tmp_users.sql
  • supabase/migrations/20260102140000_fix_get_identity_hashed_apikeys.sql
  • supabase/migrations/20260103030451_add_advisory_lock_to_cron.sql
  • supabase/migrations/20260104100000_add_allow_preview_to_apps.sql
  • supabase/migrations/20260104110000_add_apikey_policy_to_get_orgs_v7.sql
  • supabase/migrations/20260104120000_revoke_process_function_queue_public_access.sql
  • supabase/migrations/20260105014309_remove_metered.sql
  • supabase/migrations/20260105150626_fix_is_allowed_capgkey_hashed_apikeys.sql
  • supabase/migrations/20260107000000_add_anon_role_to_webhooks_rls.sql
  • supabase/migrations/20260108000000_add_electron_platform.sql
  • supabase/migrations/20260108024031_add_devices_platform_columns.sql
  • supabase/migrations/20260109000000_fix_build_system_rls_consistency.sql
  • supabase/migrations/20260109000001_remove_both_platform_option.sql
  • supabase/migrations/20260110044840_improve_usage_credit_rls.sql
  • supabase/migrations/20260112140000_cleanup_old_channel_devices.sql
  • supabase/migrations/20260113000000_add_plugin_breakdown_to_global_stats.sql
  • supabase/migrations/20260113132114_missing_index.sql
  • supabase/migrations/20260113160650_delete_old_deleted_versions.sql
  • supabase/migrations/20260114214731_add_deleted_at_column.sql
  • supabase/migrations/20260115025158_add_daily_fail_ratio_email.sql
  • supabase/migrations/20260115051444_sync_stripe_info_on_org_create.sql
  • supabase/migrations/20260118000000_add_build_stats_to_global_stats.sql
  • supabase/migrations/20260118005052_version_usage_use_version_name.sql
  • supabase/migrations/20260119182934_add_use_new_rbac_to_get_orgs_v7.sql
  • supabase/migrations/20260120165047_rbac_invites.sql
  • supabase/migrations/20260121000000_add_demo_app_support.sql
  • supabase/migrations/20260123140712_fix_rbac_perf_security.sql
  • supabase/migrations/20260124231940_fix_multiple_permissive_policies.sql
  • supabase/migrations/20260125151000_mau_first_seen_device_usage.sql
  • supabase/migrations/20260127120000_enforce_2fa_in_permission_checks.sql
  • supabase/migrations/20260127121000_allow_credits_without_plan.sql
  • supabase/migrations/20260127153000_require_recent_reauth_for_delete_user.sql
  • supabase/migrations/20260127232000_sanitize_text_fields.sql
  • supabase/migrations/20260129120000_fix_reject_access_due_to_2fa_for_app.sql
  • supabase/migrations/20260129123000_fix_is_bundle_encrypted_empty.sql
  • supabase/migrations/20260130032543_allow_org_logo_images.sql
  • supabase/migrations/20260130033703_private_images_bucket.sql
  • supabase/migrations/20260130040811_allow_org_logo_upload.sql
  • supabase/migrations/20260130190800_update_invite_expiry_on_resend.sql
  • supabase/migrations/20260201015640_add_upgrade_org_stats.sql
  • supabase/migrations/20260201042609_fix_password_policy_org_read_gate.sql
  • supabase/migrations/20260202090000_add_cli_realtime_feed_pref.sql
  • supabase/migrations/20260203010025_add_build_success_stats.sql
  • supabase/migrations/20260203120000_optimize_org_metrics_cache.sql
  • supabase/migrations/20260203140000_security_hardening.sql
  • supabase/migrations/20260203150000_fix_get_user_main_org_id_by_app_id_seed.sql
  • supabase/migrations/20260203160000_optimize_audit_logs_rls.sql
  • supabase/migrations/20260203173000_get_account_removal_date_auth.sql
  • supabase/migrations/20260203190000_check_min_rights_apikey_scope.sql
  • supabase/migrations/20260203201308_rbac_org_member_no_app_access.sql
  • supabase/migrations/20260204100000_restore_audit_logs_apikey.sql
  • supabase/migrations/20260204103000_mfa_email_otp_guard.sql
  • supabase/migrations/20260204103001_enable_security_settings_rls.sql
  • supabase/migrations/20260204181424_add_channel_permission_overrides.sql
  • supabase/migrations/20260205031305_mfa_email_otp_hardening.sql
  • supabase/migrations/20260205120000_fix_audit_logs_select_rls.sql
  • supabase/migrations/20260206120000_apikey_server_generation.sql
  • supabase/migrations/20260206213247_org_has_usage_credits_flag.sql
  • supabase/migrations/20260207180640_tmp_users_cleanup_7_days.sql
  • supabase/migrations/20260209014020_user_created_via_invite.sql
  • supabase/migrations/20260209024134_remove_exceeded_flags_functions.sql
  • supabase/migrations/20260210132811_stats_customid_guard.sql
  • supabase/migrations/20260211034517_add_demo_apps_created_to_global_stats.sql
  • supabase/migrations/20260214054927_restore_top_up_usage_credits_for_service_role.sql
  • supabase/migrations/20260216102420_add_build_status_reconciliation_cron.sql
  • supabase/migrations/20260221150207_fix_role_bindings_rls_update_insert.sql
  • supabase/migrations/20260223000001_add_sso_providers.sql
  • supabase/migrations/20260224091500_fix_get_orgs_v6_access_controls.sql
  • supabase/migrations/20260224093000_fix_get_total_metrics_auth.sql
  • supabase/migrations/20260224153000_add_org_conversion_rate_to_global_stats.sql
  • supabase/migrations/20260224153100_fix_org_member_rpc_access.sql
  • supabase/migrations/20260224153200_fix_webhook_rls_org_scoping.sql
  • supabase/migrations/20260224153201_revoke_record_email_otp_verified_auth_role.sql
  • supabase/migrations/20260224153300_add_created_at_to_get_orgs_v7.sql
  • supabase/migrations/20260224153401_fix_transfer_app_security.sql
  • supabase/migrations/20260224153500_restrict_rpc_api_key_oracles.sql
  • supabase/migrations/20260224160000_fix_find_apikey_rpc_permissions.sql
  • supabase/migrations/20260225000000_image_metadata_cleanup_triggers.sql
  • supabase/migrations/20260225000100_atomic_demo_app_creation.sql
  • supabase/migrations/20260225105000_exist_app_v2_apikey_auth.sql
  • supabase/migrations/20260225120000_restrict_webhooks_select_for_admin_only.sql
  • supabase/migrations/20260226000000_org_rls_require_self_2fa_update.sql
  • supabase/migrations/20260226000100_fix_org_rls_2fa_function_permissions.sql
  • supabase/migrations/20260226090000_require_verified_email_for_delete_user.sql
  • supabase/migrations/20260226153000_restrict_apikey_oracle_rpcs.sql
  • supabase/migrations/20260227000000_fix_rescind_invitation_rpc_access.sql
  • supabase/migrations/20260227000001_secure_record_build_time_rpc.sql
  • supabase/migrations/20260227010000_restrict_upsert_version_meta_exec.sql
  • supabase/migrations/20260227150000_fix_invite_user_to_org_security.sql
  • supabase/migrations/20260228000000_role_bindings_rls_assignable.sql
  • supabase/migrations/20260228000100_delete_member_cascade_bindings.sql
  • supabase/migrations/20260228000200_prevent_last_super_admin_delete.sql
  • supabase/migrations/20260228000300_fix_apikey_hashed_lookup.sql
  • supabase/migrations/20260228154639_fix_check_domain_sso_security.sql
  • supabase/migrations/20260228172308_fix_prevent_last_super_admin_cascade.sql
  • supabase/migrations/20260228172309_fix_rbac_test_compatibility.sql
  • supabase/migrations/20260302000000_rbac_default_for_new_orgs.sql
  • supabase/migrations/20260302185011_fix_rbac_check_effective_user.sql
  • supabase/migrations/20260303150634_sso_per_org_feature_flag.sql
  • supabase/migrations/20260308121758_fix_get_app_global_metrics_rbac.sql
  • supabase/migrations/20260308121933_restrict_global_stats_access.sql
  • supabase/migrations/20260308203352_restrict-org-status-rpc-access.sql
  • supabase/migrations/20260311120000_allow_shared_public_images.sql
  • supabase/migrations/20260311123000_fix_rbac_has_permission_preserve_org_for_new_app.sql
  • supabase/migrations/20260311124500_fix_get_org_perm_for_apikey_rbac.sql
  • supabase/migrations/20260311150453_secure_sso_enforcement_lookup.sql
  • supabase/migrations/20260311162400_sync_org_user_delete_role_bindings.sql
  • supabase/migrations/20260311164503_split_is_admin_platform_admin_and_rls.sql
  • supabase/migrations/20260312000000_remove_rbac_security_settings_singletons.sql
  • supabase/migrations/20260312183000_normalize_sso_provider_domain_lowercase.sql
  • supabase/migrations/20260312202155_hardening_get_identity_apikey_only_rpcs.sql
  • supabase/migrations/20260312202212_fix_rescind_invitation_rpc_access_hardening.sql
  • supabase/migrations/20260312202227_fix_rbac_org_user_access_null_auth_gate.sql
  • supabase/migrations/20260312202250_cli_created_record_build_time_public_revoke_fix.sql
  • supabase/migrations/20260313104400_fix_get_current_plan_max_org_access_cli.sql
  • supabase/migrations/20260313104427_webhook-api-key-org-scope-cli.sql
  • supabase/migrations/20260313121928_fix-onboarding-needed-org-nonexistent.sql
  • supabase/migrations/20260313130044_harden_upsert_version_meta_authz.sql
  • supabase/migrations/20260316132841_move_mfa_email_otp_trigger_to_public.sql
  • supabase/migrations/20260316220423_harden_plan_usage_org_rpc_access.sql
  • supabase/migrations/20260317020451_secure_remaining_helper_rpcs.sql
  • supabase/migrations/20260317020500_revoke_cleanup_expired_demo_apps_public_exec.sql
  • supabase/migrations/20260317021715_fix_get_user_org_ids_apikey_expiry.sql
  • supabase/migrations/20260317040310_restrict_manifest_read_access.sql
  • supabase/migrations/20260317090000_fix_get_app_versions_rbac.sql
  • supabase/migrations/20260317100429_fix_encrypted_bundle_update_enforcement.sql
  • supabase/migrations/20260317160518_sso_skip_org_on_sso_domain.sql
  • supabase/migrations/20260318210857_fix_get_orgs_v7_private_overload_grants.sql
  • supabase/migrations/20260318220337_optimize-org-metrics-cache-read-only.sql
  • supabase/migrations/20260319090430_password_policy_max_length_72.sql
  • supabase/migrations/20260319094649_add_build_minutes_to_global_stats.sql
  • supabase/migrations/20260319103952_fix_subkey_header_and_plan_usage_rpcs.sql
  • supabase/migrations/20260319155734_fix_global_stats_build_seconds_and_conversion_rate.sql
  • supabase/migrations/20260319164053_fix_manifest_select_rls.sql
  • supabase/migrations/20260319221428_onboarding_app_flags.sql
  • supabase/migrations/20260319235626_disable_auto_org_on_user_create.sql
  • supabase/migrations/20260320044548_add_org_website.sql
  • supabase/migrations/20260320133752_app_demo_flag_cleanup.sql
  • supabase/migrations/20260323075628_fix_rbac_admin_rpc_execute_grants.sql
  • supabase/migrations/20260324181219_fix_process_cron_stats_activity.sql
  • supabase/migrations/20260324181246_add_paid_at_for_admin_revenue_metrics.sql
  • supabase/migrations/20260325032835_optimize_webhooks_rls_auth_eval.sql
  • supabase/migrations/20260325043000_harden_cron_stats_queue_followup.sql
  • supabase/migrations/20260325045835_split_channel_permission_overrides_write_policies.sql
  • supabase/migrations/20260327044102_fix_cron_sync_sub_queue_payload.sql
  • supabase/migrations/20260327210500_app_scoped_metrics_rbac.sql
  • supabase/migrations/20260327220305_add_webhook_queues_to_cron_tasks.sql
  • supabase/migrations/20260330141128_stripe_customer_country.sql
  • supabase/migrations/20260408134842_adjust_build_time_credit_pricing.sql
  • supabase/migrations/20260408140215_fix_org_metrics_cache_delete_cascade.sql
  • supabase/migrations/20260422104849_stale_chart_refresh_state.sql
  • supabase/migrations/20260422203355_add_admin_retention_metrics.sql
  • supabase/migrations/20260424090111_fix_rbac_scope_mismatch_escalation.sql
  • supabase/migrations/20260424090125_protect_owner_org_transfer_path.sql
  • supabase/migrations/20260424090727_block_apikey_channel_updates.sql
  • supabase/migrations/20260424090854_enforce_public_channel_uniqueness.sql
  • supabase/migrations/20260424090941_fix_transfer_app_deploy_history_owner_org.sql
  • supabase/migrations/20260424091645_enforce_hashed_api_keys_on_rls_identity_path.sql
  • supabase/migrations/20260424094101_enforce_apikey_scope_in_rbac_check.sql
  • supabase/migrations/20260424094225_harden_role_bindings_cross_org_scope.sql
  • supabase/migrations/20260427092702_fix_transfer_app_guard_allowlist.sql
  • supabase/migrations/20260427105151_harden_security_definer_execute_grants.sql
  • supabase/migrations/20260427105817_restrict_is_paying_and_good_plan_org_action_access.sql
  • supabase/migrations/20260427105834_restrict_manifest_mutation_access.sql
  • supabase/migrations/20260427105838_enforce_apikey_expiration_policy.sql
  • supabase/migrations/20260427105909_fix_apikey_helper_rpc_public_execute.sql
  • supabase/migrations/20260427110612_retention_metrics_service_role_rls.sql
  • supabase/migrations/20260427142358_require_recent_email_otp_for_delete_user.sql
  • supabase/migrations/20260427144300_rbac_apikey_bindings_priority.sql
  • supabase/migrations/20260427144323_cli_rbac_permission_wrappers.sql
  • supabase/migrations/20260427144324_add_org_create_app_permission.sql
  • supabase/migrations/20260427144325_fix_helper_rpc_request_role_and_admin_grants.sql
  • supabase/migrations/20260427144331_restore_rbac_apikey_mismatch_and_bindings_priority.sql
  • supabase/migrations/20260427175506_temporary_cli_apps_list_anon_helper_grants.sql
  • supabase/migrations/20260429094653_restore_deleted_account_recovery.sql
  • supabase/migrations/20260429135552_enable_rbac_all_orgs.sql
  • supabase/migrations/20260430145247_validate_org_security_settings.sql
  • supabase/migrations/20260430145518_enforce_check_min_rights_app_org_scope.sql
  • supabase/migrations/20260501162433_fix_storage_cleanup_counts.sql
  • supabase/migrations/20260501200000_remove_sso_enabled_flag.sql
  • supabase/migrations/20260502134045_fix_audit_logs_anon_dos.sql
  • supabase/migrations/20260502134234_prevent_last_super_admin_demotion.sql
  • supabase/migrations/20260502134355_fix_rbac_role_binding_demoted_super_admin.sql
  • supabase/migrations/20260504174812_fix_build_time_daily_aggregation.sql
  • supabase/migrations/20260505163356_apikey_nullable_mode_with_bindings.sql
  • supabase/migrations/20260505193449_harden_encrypted_bundle_update_invariant.sql
  • supabase/migrations/20260506101503_add_churn_revenue_plan_breakdown.sql
  • supabase/migrations/20260506103727_add_plugin_version_ladder_to_global_stats.sql
  • supabase/migrations/20260506152006_native_version_usage_chart.sql
  • supabase/migrations/20260507082135_active_usage_credits_flag.sql
  • supabase/migrations/20260507090047_fix_app_versions_anon_dos.sql
  • supabase/migrations/20260507090436_fix_apikey_rbac_rpc_oracle_and_expiration_scope.sql
  • supabase/migrations/20260507091347_secure_exist_app_versions_rpc.sql
  • supabase/migrations/20260507153639_fast_app_versions_select_policy.sql
  • supabase/migrations/20260507165636_fast_usage_credit_rls_policies.sql
  • supabase/migrations/20260508122137_fix_app_versions_trigger_owner_org.sql
  • supabase/migrations/20260508135918_enforce_channel_promotion_permission.sql
  • supabase/migrations/20260510103516_stats_health_events_metadata.sql
  • supabase/migrations/20260510161104_build_timeout_seconds.sql
  • supabase/migrations/20260510171814_native_build_concurrency_plan_limit.sql
  • supabase/migrations/20260510183000_add_build_runner_wait_seconds.sql
  • supabase/migrations/20260510190432_fix_apikey_rbac_password_policy_gate.sql
  • supabase/migrations/20260510191550_add_paid_product_activity_to_global_stats.sql
  • supabase/migrations/20260510214140_org_initial_plan_solo_mau_limit.sql
  • supabase/migrations/20260510214806_add_plan_conversion_rates_to_global_stats.sql
  • supabase/migrations/20260510235542_add_plan_total_conversion_rate.sql
  • supabase/migrations/20260511101826_add_ltv_global_stats.sql
  • supabase/migrations/20260511151503_fix_get_organization_cli_warnings_rbac.sql
  • supabase/migrations/20260513000348_add_audit_log_retention_cron.sql
  • supabase/migrations/20260513152636_replace_manifest_cleanup_index.sql
  • supabase/migrations/20260514093535_app_versions_r2_path_index.sql
  • supabase/migrations/20260514102952_enforce_90_day_deleted_versions_cleanup.sql
  • supabase/migrations/20260515170516_drop_redundant_channel_devices_unique_constraint.sql
  • supabase/migrations/20260516151507_fix_cli_warnings_app_scoped_apikeys.sql
  • supabase/migrations/20260517102815_enforce_webhook_created_by.sql
  • supabase/migrations/20260518120000_add_ai_analyzed_to_build_requests.sql
  • supabase/migrations/20260518121000_standard_webhook_secrets.sql
  • supabase/migrations/20260518130000_plan_check_passthrough_appid.sql
  • supabase/migrations/20260518131054_complete_onboarding_after_first_upload.sql
  • supabase/migrations/20260519065534_revert_complete_onboarding_after_first_upload_trigger.sql
  • supabase/migrations/20260519123613_safe_demo_data_reset.sql
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/migrations/20260521210531_cron_hyperping_healthchecks.sql
  • supabase/migrations/20260524123635_drop_channel_devices_owner_org_index.sql
  • supabase/migrations/20260526133000_migrate_apikeys_to_v2_timestamp_fix.sql
💤 Files with no reviewable changes (100)
  • supabase/migrations/20251026165357_add_missing_queue_cron_jobs.sql
  • supabase/migrations/20260113000000_add_plugin_breakdown_to_global_stats.sql
  • supabase/migrations/20251106024103_add_default_channel_to_devices.sql
  • supabase/migrations/20250605151648_credits.sql
  • supabase/migrations/20260115025158_add_daily_fail_ratio_email.sql
  • supabase/migrations/20260118000000_add_build_stats_to_global_stats.sql
  • supabase/migrations/20260121000000_add_demo_app_support.sql
  • supabase/migrations/20260104100000_add_allow_preview_to_apps.sql
  • supabase/migrations/20260109000001_remove_both_platform_option.sql
  • supabase/migrations/20251024153920_update_capgo_credits_steps_org.sql
  • supabase/migrations/20251204163538_drop_plans_overage_columns.sql
  • supabase/migrations/20250601115144_better_queue_logs.sql
  • supabase/migrations/20251014120000_add_batch_size_to_process_function_queue.sql
  • supabase/migrations/20251007132214_global_stats_registers_storage.sql
  • supabase/migrations/20250921120000_device_version_name.sql
  • supabase/migrations/20251228160000_get_org_members_apikey_support.sql
  • supabase/migrations/20251208175306_fix_user_delete_old_record.sql
  • supabase/migrations/20251229233706_replace_uuid_generate_v4_with_gen_random_uuid.sql
  • supabase/migrations/20260113132114_missing_index.sql
  • supabase/migrations/20260103030451_add_advisory_lock_to_cron.sql
  • supabase/migrations/20251219192610_add_cli_version_to_app_versions.sql
  • supabase/migrations/20251226121000_add_channel_stats_actions.sql
  • supabase/migrations/20260127153000_require_recent_reauth_for_delete_user.sql
  • supabase/migrations/20260114214731_add_deleted_at_column.sql
  • supabase/migrations/20251213114641_add_revenue_metrics_to_global_stats.sql
  • supabase/migrations/20251228150000_reject_access_due_to_2fa_for_app.sql
  • supabase/migrations/20260108000000_add_electron_platform.sql
  • supabase/migrations/20251228065406_user_email_preferences.sql
  • supabase/migrations/20250612131646_exist_app.sql
  • supabase/migrations/20251119001844_add_missing_foreign_key_indexes.sql
  • supabase/migrations/20260108024031_add_devices_platform_columns.sql
  • supabase/migrations/20251007134349_cron_plan_from_stats_backend.sql
  • supabase/migrations/20251213140000_add_encryption_tracking_to_devices.sql
  • supabase/migrations/20251031202034_fix_usage_credit_rls.sql
  • supabase/migrations/20260125151000_mau_first_seen_device_usage.sql
  • supabase/migrations/20250920120001_remove_old_version_meta.sql
  • supabase/migrations/20251113041643_transfer_ownership_before_user_deletion.sql
  • supabase/migrations/20251230114041_reject_access_due_to_2fa_for_org.sql
  • supabase/migrations/20250608130257_fix_version_meta.sql
  • supabase/migrations/20260104120000_revoke_process_function_queue_public_access.sql
  • supabase/migrations/20250619221552_global_stats.sql
  • supabase/migrations/20250909094709_better_account_delete.sql
  • supabase/migrations/20251107153019_manifest_bundle_counts.sql
  • supabase/migrations/20251107001223_channel_device_counts.sql
  • supabase/migrations/20260124231940_fix_multiple_permissive_policies.sql
  • supabase/migrations/20250927082020_better_app_metrics.sql
  • supabase/migrations/20260127120000_enforce_2fa_in_permission_checks.sql
  • supabase/migrations/20260119182934_add_use_new_rbac_to_get_orgs_v7.sql
  • supabase/migrations/20250714021423_manifest_perf.sql
  • supabase/migrations/20260102120000_fix_get_org_members_include_tmp_users.sql
  • supabase/migrations/20260110044840_improve_usage_credit_rls.sql
  • supabase/migrations/20260109000000_fix_build_system_rls_consistency.sql
  • supabase/migrations/20251226120000_add_channel_allow_device_prod.sql
  • supabase/migrations/20251228215402_add_orphan_images_cleanup.sql
  • supabase/migrations/20251229030503_add_cron_tasks_rls_policy.sql
  • supabase/migrations/20251024230753_fix_org_delete_cascade.sql
  • supabase/migrations/20251221091510_fix_lint_indexes.sql
  • supabase/migrations/20251212112948_add_expose_metadata_to_apps.sql
  • supabase/migrations/20251229100000_fix_check_org_members_password_policy_service_role.sql
  • supabase/migrations/20250928145642_orgs_last_stats_updated.sql
  • supabase/migrations/20260113160650_delete_old_deleted_versions.sql
  • supabase/migrations/20251223234326_fix_duplicate_overage_tracking.sql
  • supabase/migrations/20251228063320_fix_audit_log_apikey.sql
  • supabase/migrations/20260102140000_fix_get_identity_hashed_apikeys.sql
  • supabase/migrations/20251014135440_add_cron_sync_sub.sql
  • supabase/migrations/20250920120000_remove_legal_and_update_notification_defaults.sql
  • supabase/migrations/20260104110000_add_apikey_policy_to_get_orgs_v7.sql
  • supabase/migrations/20251227040840_add_production_deploy_install_stats_email.sql
  • supabase/migrations/20251228082157_add_apikey_policy_to_get_orgs.sql
  • supabase/migrations/20260115051444_sync_stripe_info_on_org_create.sql
  • supabase/migrations/20250916032824_fix_retention.sql
  • supabase/migrations/20251019123107_fix_stats.sql
  • supabase/migrations/20251209184322_add_top_up_credits_system.sql
  • supabase/migrations/20251103134045_add_download_stats_actions.sql
  • supabase/migrations/20251220011455_optimize_is_good_plan_v5_org.sql
  • supabase/migrations/20251228033417_webhooks.sql
  • supabase/migrations/20260107000000_add_anon_role_to_webhooks_rls.sql
  • supabase/migrations/20260105014309_remove_metered.sql
  • supabase/migrations/20260123140712_fix_rbac_perf_security.sql
  • supabase/migrations/20260127121000_allow_credits_without_plan.sql
  • supabase/migrations/20260105150626_fix_is_allowed_capgkey_hashed_apikeys.sql
  • supabase/migrations/20251226125240_audit_log.sql
  • supabase/migrations/20260118005052_version_usage_use_version_name.sql
  • supabase/migrations/20251228080032_hashed_api_keys.sql
  • supabase/migrations/20260101042511_enforce_encrypted_bundles.sql
  • supabase/migrations/20251228100000_password_policy_enforcement.sql
  • supabase/migrations/20250908120000_pg_log_and_rls_logging.sql
  • supabase/migrations/20251021141631_add_usage_credit_system.sql
  • supabase/migrations/20251119001847_add_native_build_system.sql
  • supabase/migrations/20250613034031_tmp_users_table.sql
  • supabase/migrations/20251228080037_apikey_expiration.sql
  • supabase/migrations/20251120150750_simplify_manifest_bundle_counts.sql
  • supabase/migrations/20250903010822_consolidated_org_apikey_migrations.sql
  • supabase/migrations/20260112140000_cleanup_old_channel_devices.sql
  • supabase/migrations/20251231060433_add_billing_period_stats_email.sql
  • supabase/migrations/20250913161225_lint_warning_fixes_followup.sql
  • supabase/migrations/20251224103713_2fa_enforcement.sql
  • supabase/migrations/20260120165047_rbac_invites.sql
  • supabase/migrations/20251113140646_consolidate_cron_job.sql
  • supabase/migrations/20251014105957_rename_plan_cron.sql

Comment thread scripts/repair-supabase-squashed-baseline.sh
Comment thread scripts/repair-supabase-squashed-baseline.sh
@riderx riderx force-pushed the codex/squash-supabase-migrations branch from e1a5e7c to 24b8a53 Compare June 8, 2026 17:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24b8a5331c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/repair-supabase-squashed-baseline.sh Outdated
@riderx riderx force-pushed the codex/squash-supabase-migrations branch from 24b8a53 to b5da889 Compare June 8, 2026 17:43
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@riderx riderx dismissed coderabbitai[bot]’s stale review June 8, 2026 17:57

Stale after addressed comments and passing CI on b5da889.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant