Integrating Alembic with SQLAlchemy
问题 I'm looking at a way to integrate Alembic with SQLAlchemy. What I need is a way so that Alembic detects any changes I make in models.py automatically and updates it in the MySQL database when I run alembic revision -m "<message_here>" and alembic upgrade head . Here is what I have at the moment. This is my application directory structure. /myapplication models.py __init__.py app.py /migrations env.py script.py.mako /versions The models.py contains the following. from sqlalchemy import Column,