mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
refactor: 迁移文件内联 helpers,删除共享 alembic/helpers.py
将 _SchemaCache、replace_fk_if_needed、batch_alter_type 等辅助函数 内联到各迁移文件中,使每个迁移自包含、不依赖外部模块。 同时修正 a3f1b7c9d2e4 的 down_revision 为 d7649c1f8e21。
This commit is contained in:
@@ -14,8 +14,6 @@ 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:
|
||||
|
||||
Reference in New Issue
Block a user