KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When I use alembic to control the version of my project's database,part of codes in env.py like: # add your model's MetaData object here # for 'autogenerate' support # from myapp import mymodel # target_metadata = mymodel.Base.metadata from al_test.models import metadata target_metadata = metadata when I run 'alembic revision --autogenerate -m "Added user table"', I get an error : File "alembic/env.py", line 18, in from al_test.models import metadata ImportError: No module named al_test.models so how to solve the question? thanks!
Tags (comma-separated)
Save Edits
Cancel