Replies: 4 comments 2 replies
|
I was able to fix this by going into the project > Tables > selecting the |
|
I have the same, applying |
|
I have the same issue. I have migrations on the remote that I want to pull in my local db, but |
|
The supabase db remote commit command was deprecated and removed in newer CLI versions. If youre on a recent CLI the equivalent workflow is now supabase db pull which generates a migration file from your remote schema. But the underlying problem youre hitting is the same, the migration history table on remote has entries that dont match whats in your local supabase/migrations folder. The cleanest fix when starting fresh is what caseybaggz mentioned, clear the supabase_migrations.schema_migrations table on remote, then run supabase db pull to create a baseline migration from your current remote schema. This gives you a clean starting point. Just be aware this means youre saying "forget all previous migration history and start from the current state." For ahmadbilaldev and Nelhoa's question about why pull wont pull remote changes, the command isnt designed to sync migration files themselves. It generates a new migration based on the difference between your local migrations and the remote schema. If theyre already in sync schema wise but the history table is mismatched, you need to use supabase migration repair to mark migrations as applied or reverted without actually running them (https://supabase.com/docs/reference/cli/supabase-migration-repair). Running supabase db pull --debug should show you exactly which migrations are causing the mismatch. From there you can either repair the history or do a clean reset depending on your situation. For teams where the bigger headache is keeping actual data consistent between their Supabase database and external systems like HubSpot or Salesforce rather than schema migrations, thats a different problem entirely and more what Stacksync addresses. But for CLI migration sync issues the repair command or history reset should get you moving again. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have:
logged in
supbase loginsetup project
supabase link --project-ref xxxxxyet no
remote_commitcan be found insupabase/migrations/when running
supabase db remote commitI get:I tired
supabase db pushbefore runningsupbase remote commitas suggested in some comments but it results in same errorAll reactions