diff --git a/pkg/migration/queries/drop.sql b/pkg/migration/queries/drop.sql index ed07c7242d..a153891fe6 100644 --- a/pkg/migration/queries/drop.sql +++ b/pkg/migration/queries/drop.sql @@ -55,13 +55,12 @@ begin execute format('drop table if exists %I.%I cascade', rec.relnamespace::regnamespace::name, rec.relname); end loop; - -- truncate tables in auth, storage, webhooks, and migrations schema + -- truncate tables in auth, webhooks, and migrations schema for rec in select * from pg_class c where (c.relnamespace::regnamespace::name = 'auth' and c.relname != 'schema_migrations' - or c.relnamespace::regnamespace::name = 'storage' and c.relname != 'migrations' or c.relnamespace::regnamespace::name = 'supabase_functions' and c.relname != 'migrations' or c.relnamespace::regnamespace::name = 'supabase_migrations') and c.relkind = 'r'