mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
fix: 单个迁移文件自行提交
This commit is contained in:
@@ -105,6 +105,7 @@ def run_migrations_online() -> None:
|
|||||||
target_metadata=target_metadata,
|
target_metadata=target_metadata,
|
||||||
compare_type=True,
|
compare_type=True,
|
||||||
compare_server_default=True,
|
compare_server_default=True,
|
||||||
|
transaction_per_migration=True, # 每个迁移文件独立事务,完成即提交
|
||||||
)
|
)
|
||||||
|
|
||||||
with context.begin_transaction():
|
with context.begin_transaction():
|
||||||
|
|||||||
Reference in New Issue
Block a user