My supabase remote and local migrations are completely off
I started working on a project and I was trying to set up supabase locally so I can test the Edge functions before deploying. I noticed a couple of things in the migrations:
- The first is that the first 2 migrations have their names like this:
20250720115329-90dac62d-9998-4e64-83a4-57d5a1a9c289.sql&20250722182953-4e8ca653-37f4-494b-a494-ccda73a1c58d.sql. You can see that there is a - here instead of a _ after the timestamp which causes issues when I run the commandsupabase startas these migrations are not applied. - Secondly, none of the migrations in local and remote are matching after I run
supabse migration list. They are completely off. The remote migrations do not exist in local and the local migrations do not exist in remote. I don't know how this could have happened (this was a lovable made proejct handed over to me to work on) but I am trying to understand how I can fix it. Is there a way I can just get all the remote migrations in my migrations folder?