最佳答案
alembic.context
仅适用于 env.py
通过 alembic
执行的脚本命令,并假设 alembic
命令从包含 alembic.ini
的文件夹中执行。文件指定要使用的 Alembic 配置。
否则,alembic
模块没有 context
属性(property)。
如需更多信息,请参阅 this answer to a similar question .
关于python - 属性错误 : module 'alembic.context' has no attribute 'config' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51203641/