Skip to content

Record DB-03 legacy policy drop as a migration - #219

Merged
Programcode merged 1 commit into
mainfrom
fix/db03-drop-legacy-policies
Oct 23, 2026
Merged

Programcode merged 1 commit into
mainfrom
fix/db03-drop-legacy-policies

Conversation

@Programcode

Copy link
Copy Markdown
Owner

Adam approved DB-03 on 23 Oct 2026 ("Test shared links on staging first, then run DB-03 on prod if they still work").

What happened before this PR

  • Policies on shared_items, user_roles and ai_requests were backed up on both projects, with restore SQL.
  • DB-03 was run by hand on staging in one transaction, with its guard and a post-check. Then on staging:
    • a share was created through the share function and opened by code at /share/<code> and through get_shared_item, signed out and signed in;
    • an expired share showed "Shared link not found";
    • the signed-in user read only their own user_roles row;
    • the usage count on ai_requests and ai_usage_today both loaded;
    • the only 4xx responses were the deliberate negative probes.
  • It was then run on production the same way, and the smoke tests passed there too.

This PR moves the file from supabase/proposed/ to supabase/migrations/ under a new timestamp, so main matches the hosted projects. On both projects it now finds nothing left to drop, because the guard passes and every drop is IF EXISTS.

Local gates (GitHub Actions fail within seconds on every PR right now):

  • bash .superset/db-gate.sh --db-only: PASS, 28 files and 516 tests, including shared_items_rls, user_roles_rls and share_views.
  • npm run verify: see the comment below.

Adam approved DB-03 on 23 Oct 2026. It was run by hand on staging, tested
there (shared links signed in and out, expired links, own role read, usage
count), then run on production. The file moves from supabase/proposed/ to
supabase/migrations/ under a new timestamp so main matches the hosted
projects; on both it finds nothing left to drop.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 07:54

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 731a1a5 and fb78853.

📒 Files selected for processing: 1
  • supabase/migrations/20261023080000_drop_legacy_policies.sql
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Programcode

Copy link
Copy Markdown
Owner Author

Local gates on head fb78853 (GitHub Actions fail within seconds on every PR right now, as on #209 and #218):

  • npm run verify exit 0: docs:check, lint (squawk included), typecheck, unit, collab, edge, build, test:sw, and e2e smoke (47 passed).
  • bash .superset/db-gate.sh --db-only exit 0: pgTAP 28 files, 516 tests, PASS, including shared_items_rls, user_roles_rls and share_views. The new migration applied cleanly on a fresh stack, and the stack was stopped afterwards.

@Programcode
Programcode merged commit 3aa123a into main Oct 23, 2026
3 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants