I didn't realize it, but I started tracking Flask-Migrate (sqlalchemy) migrations after I manually created some DB tables.
This caused a fair amount of grief for "new" deployments and broke the Ansible playbook.
I updated the initial migration script to include the necessary commands to create tables from a "fresh" (blank) DB.
E.g. running db.create_all() is no longer necessary; on a fresh install just run ./manage.py db upgrade and Flask-Migrate will create the DB and apply migrations to bring it to "current".
… DB to function as expected.
I didn't realize it, but I started tracking Flask-Migrate (sqlalchemy) migrations after I manually created some DB tables.
This caused a fair amount of grief for "new" deployments and broke the Ansible playbook.
I updated the initial migration script to include the necessary commands to create tables from a "fresh" (blank) DB.
E.g. running
db.create_all()
is no longer necessary; on a fresh install just run./manage.py db upgrade
and Flask-Migrate will create the DB and apply migrations to bring it to "current".