When I use alembic to control the version of my project database, some of the codes in env.py are like:
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 the import metadata al_test.models ImportError: no module with named al_test.models
so how to resolve the issue? thank!
source
share