[Fixed]-Alembic – sqlalchemy initial migration


In addition to importing your declarative Base class, you also need to import all of your models as well. Something like import project.models or whatever module(s) you have to include so that all your model classes are imported. Otherwise, your Base.metadata doesn’t get populated with your model definitions since env.py never includes them.

Leave a comment