docker-compose.dev.yml had the file system set to read-only for the web container
Flask-Migrate / Alembic configuration struggles with multiple databases, and the sql bind 'mpower' breaks the expected functionality.
To correctly use flask db migrate to autogenerate changes to just the tb-api data model:
created a new, much simpler factory_migrate.py file that I stripped down to only include db-relevant lines
in tbapi_app.py, i imported create_app from this stripped down file
Updated the env.py and script.py.mako files to remove any references to the binds/extra dbs, since that was breaking once I took out the SQLALCHEMY_BINDS section from the app config
There should be a better approach to this setup, but will likely require deeper understanding of Alembic and Flask-Migrate
Summary of issues:
docker-compose.dev.yml
had the file system set toread-only
for the web containerTo correctly use
flask db migrate
to autogenerate changes to just the tb-api data model:tbapi_app.py
, i importedcreate_app
from this stripped down fileenv.py
andscript.py.mako
files to remove any references to the binds/extra dbs, since that was breaking once I took out the SQLALCHEMY_BINDS section from the app configThere should be a better approach to this setup, but will likely require deeper understanding of Alembic and Flask-Migrate