SupabaseS
Supabase3mo ago
cj

Supabase CLI `db pull` unnecessarily dropping function that exist in remote DB

I was trying to make a migration but the CLI said my remote database's migration history does not match local files

And after a long time of trial and error I decided to delete all my migration files and ask the CLI to create a new migration pulled from the remote DB.

rm -rf supabase/migrations/*

supabase db pull --schema public,auth,storage


It created 20250923105350_remote_schema. And I assumed I can finally push my new migration. And so I ran supabase db pull --schema public,auth,storage again. But this time the CLI created a new migration where many of my DB functions were dropped. (p.s. I followed this SO answer to remove all my migrations and start fresh, but it didn't help)

How can I make my local migration file match the remote database's migration history?
Stack Overflow
While trying to create a local dev environment,
supabase db reset

is failing with
Resetting local database...
Recreating database...
Initialising schema...
Seeding globals from roles.sql...
Applying
Was this page helpful?