S
Supabase2mo ago
Almopt

Supabase db pull it's dumping all schema

So my use case is: i have two 2 online instance, one for dev and other for prod. I don't use local. for migrate stuff from online dev to online prod i was using supabase cli, by linking to dev and doing supabase db pull and then linking to prod and doing supabase push. But i think the other day i did supabase start which create a new local. and now when i try to do the workflow and doing db pull from dev instance im getting a dump off all db without paying attention to the previous migration files. I did a db reset to my local to apply all the past correct migration files. but even after that I'm still getting a schema dump when doing db pull. Can anyone knows how to solve this?
4 Replies
ihm40
ihm402mo ago
so just to understand, you have locally all your past migration files and when you run supabase db pull now you get the remote schema as a local migration file inside of incremental migration files? Have you tried running supabase migration list while linked to dev project
Almopt
AlmoptOP2mo ago
now i simple ran this command: supabase db diff -f staging_migration --db-url "your_staging_connection_string" and worked i dont know why
ihm40
ihm402mo ago
When you did this did you get a *staging_migration.sql file that represents all the changes made in the dev environment?
Almopt
AlmoptOP2mo ago
yes! dev to me is a remote instance

Did you find this page helpful?