Skip to content

Commit

Permalink
fix: drop user created publications during reset (#2789)
Browse files Browse the repository at this point in the history
Co-authored-by: billysutomo <[email protected]>
  • Loading branch information
sweatybridge and billysutomo authored Oct 21, 2024
1 parent 47b7e9a commit 1a1e908
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/migration/queries/drop.sql
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,14 @@ begin
loop
execute format('drop policy if exists %I on %I.%I cascade', rec.policyname, rec.schemaname, rec.tablename);
end loop;

-- publications
for rec in
select *
from pg_publication p
where
p.pubname != 'supabase_realtime'
loop
execute format('drop publication if exists %I', rec.pubname);
end loop;
end $$;

0 comments on commit 1a1e908

Please sign in to comment.