Skip to content

Commit 1a1e908

Browse files
fix: drop user created publications during reset (#2789)
Co-authored-by: billysutomo <[email protected]>
1 parent 47b7e9a commit 1a1e908

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/migration/queries/drop.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,14 @@ begin
7474
loop
7575
execute format('drop policy if exists %I on %I.%I cascade', rec.policyname, rec.schemaname, rec.tablename);
7676
end loop;
77+
78+
-- publications
79+
for rec in
80+
select *
81+
from pg_publication p
82+
where
83+
p.pubname != 'supabase_realtime'
84+
loop
85+
execute format('drop publication if exists %I', rec.pubname);
86+
end loop;
7787
end $$;

0 commit comments

Comments
 (0)