migration repair only edits the history table (supabase_migrations.schema_migrations), it never touches your tables. So it's safe, but let's do it in the right order so your repo matches reality:
- See the mismatch:
supabase migration list. - Check what that remote version is:
select version, name, statements from supabase_migrations.schema_migrations where version = '20250211093012';Probably something recorded while you worked in the dashboard, or a migration from another machine. - If you want that change in your repo:
supabase migration repair --status reverted 20250211093012, thensupabase db pullto write your current remote schema into a new local migration file. Commit it. supabase db pushworks again.
And then the boring rule: schema changes only through migration files, dashboard is for looking.
--linkedmeans the remote database. katja_s · edited