Hi. I use Flask-Migrate==2.2.1, Flask-SQLAlchemy==2.3.2
The project has 4 MySQL InnoDB databases, so I used --multidb param on init.
Upgrade and downgrade are ending with an error:
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction') [SQL: u"INSERT INTO alembic_version (version_num) VALUES ('2b912072f47f')"] (Background on this error at: http://sqlalche.me/e/e3q8)
Please help
The problem solved. It turned out that I had the same values for default DB engine (SQLALCHEMY_DATABASE_URI) and first of SQLALCHEMY_BINDS, hence there were two attempts to save alembic_version into the same database. I fixed that and the problem is gone.
Most helpful comment
The problem solved. It turned out that I had the same values for default DB engine (SQLALCHEMY_DATABASE_URI) and first of SQLALCHEMY_BINDS, hence there were two attempts to save
alembic_versioninto the same database. I fixed that and the problem is gone.