Alembic version out of sync between alembic vs db #1094
Unanswered
kingkong-cmd
asked this question in
Usage Questions
Replies: 1 comment 9 replies
-
turn on SQLAlchemy "debug" logging, if using alembic.ini this looks like: # Logging configuration
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = DEBUG
handlers =
qualname = sqlalchemy.engine then we would want to see the full debug SQL output for the above operation as well as a complete stack trace. other things:
|
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use flask-migrate, and when I try to push (
flask db upgrade
) my latest migration file (0db152ce17b6
) to the DB I get the below error:ERROR [flask_migrate] Error: Online migration expected to match one row when updating '3fba6dfbb433' to '0db152ce17b6' in 'alembic_version'; 0 found
When I check my DB, the alembic version is
3fba6dfbb433
, but when I runflask db heads
andflask db history
i get the below results. I am not sure what the above error means, and also what it means that the head is different from the alembic version? Can anyone please help point me in the right direction to fix this?Beta Was this translation helpful? Give feedback.
All reactions