Skip to content

Commit 3aa123a

Browse files
authored
Record DB-03 legacy policy drop as a migration (#219)
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.
1 parent 731a1a5 commit 3aa123a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

supabase/proposed/20261023060000_drop_legacy_policies.sql renamed to supabase/migrations/20261023080000_drop_legacy_policies.sql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
-- DB-03 (proposed, destructive): drop policies that no migration created.
1+
-- DB-03: drop policies that no migration created. Approved by Adam on
2+
-- 23 Oct 2026; moved from supabase/proposed/. It was run by hand on staging
3+
-- and production first, after shared links, role reads and usage counts were
4+
-- tested on staging, so on both hosted projects this finds nothing to drop.
25
--
36
-- The QA run on 22 Oct 2026 found policies on production that are not in
47
-- staging or in supabase/migrations, including duplicate permissive ones on
@@ -24,7 +27,8 @@
2427
-- caller's own rows: without user_roles_select_own, signed-in users could no
2528
-- longer read their own role (SettingsPage and the curated_sources admin
2629
-- policies depend on it), and a drifted copy would keep the leak this fixes.
27-
-- Do a dry run first (BEGIN; ...; ROLLBACK;).
30+
-- Running it again changes nothing: every drop is IF EXISTS and the kept
31+
-- policies are never dropped.
2832

2933
DO $$
3034
DECLARE

0 commit comments

Comments
 (0)