Closed carloshanson closed 4 years ago
Thanks for filing a ticket!
Normally, orm.configure_mappers()
is called when an application context is pushed by flask and a database connection is made. However, alembic (what Flask-Migrate is using) isn't pushing the application context when it generates migrations. So, I had to make a change to:
continuum.configure
(similar to your fix above).migrate
object into Continuum
so this package can automatically configure the mappers before alembic commands are issued.These changes are in the new 0.1.6 release on pypi, and associated documentation can be found here:
https://flask-continuum.readthedocs.io/en/latest/usage.html#migrations
I just added Flask-Continuum to a project using flask-migrate and received the following:
Using the sqlalchemy-continuum documentation, I added the following:
This allowed a successful migration:
The following is my test app. I used the flask-migrate documentation as the starting point, then added Flask-Continuum.