fix: 修复迁移helper

This commit is contained in:
fawney19
2026-03-09 11:52:16 +08:00
parent 0bddc7965b
commit 0a256adc94
5 changed files with 6 additions and 4 deletions

View File

@@ -14,6 +14,8 @@ from alembic import context
# 添加项目根目录到 Python 路径
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
# 添加 alembic 目录,让迁移文件可以 `from helpers import ...`
sys.path.insert(0, os.path.dirname(__file__))
# 加载 .env 文件(本地开发时需要)
try: