0

This happens when I do flask db migrate on my production PostgreSQL database.

Locally, migrate works fine (also PostgreSQL). I'm not sure what's wrong.

Some info: f1942fde9843 is not in my migrations/versions. I'm not sure why it's looking for that. But I assume it must be important.

What do I do?

I'd rather not delete anything in production if I don't have to

davidism
  • 121,510
  • 29
  • 395
  • 339
maj
  • 79
  • 1
  • 9

2 Answers2

0

when you do a migration in a different branch than your original, you'll have missing migrations. to fix, you need to change alembic_version.version_num in the database.

maj
  • 79
  • 1
  • 9
0

Go to your DB. Delete the alembic table. Then run:-

alembic upgrade head
Mehadi Hassan
  • 1,160
  • 1
  • 13
  • 33