Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alembic Downgrade,Upgrade,Revision and Migrate are doing nothing

Tags:

python

alembic

EDIT: This apparently is effecting trying to upgrade or create a new revision file as well.

I've been trying to run a downgrade in Alembic, which I have gotten to work before, with no luck. My current revision ID never changes and I was wondering if anyone could help me figure out why? It's not like I am getting an error or any kind of message that might help me understand what is going wrong. All I see is the following

INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.

Things I've tried: Just running downgrade, downgrade -1, downgrade -5, downgrade 'revision_id'. All other commands (like show) appear to be working as expected, so I honestly have very little to go on.

Know I'm no expert with Alembic, so I'm likely missing something simple.

Thanks in advance.

like image 395
J. Finn Avatar asked Dec 14 '25 04:12

J. Finn


1 Answers

Found the issue. We have a database table that holds the current revision id. That had gotten out of sync in my copy of the DB. Once I had updated that, everything started working again.

like image 130
J. Finn Avatar answered Dec 15 '25 17:12

J. Finn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!