Skip to content

Commit d1e5101

Browse files
committed
🐛 fix(alembic): allow run migrations dir exists
1 parent 88a9019 commit d1e5101

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nonebot_plugin_orm/migrate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ def ignore(path: str, names: list[str]) -> set[str]:
310310
Path(sc.path) for sc in script.walk_revisions(base="base", head=current)
311311
)
312312
shutil.rmtree(_data_dir / "migrations", ignore_errors=True)
313-
shutil.copytree(config._temp_dir, _data_dir / "migrations", ignore=ignore)
313+
shutil.copytree(
314+
config._temp_dir, _data_dir / "migrations", ignore=ignore, dirs_exist_ok=True
315+
)
314316

315317

316318
def list_templates(config: AlembicConfig) -> None:

0 commit comments

Comments
 (0)