Skip to content

Commit

Permalink
mkdir run_dir before init_db
Browse files Browse the repository at this point in the history
  • Loading branch information
suecharo committed Jul 17, 2024
1 parent 3de79de commit 2e780fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sapporo/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def init_db() -> None:
it will be deleted and regenerated from scratch.
"""
engine = create_db_engine()
get_config().run_dir.mkdir(parents=True, exist_ok=True)
if get_config().run_dir.joinpath(DATABASE_NAME).exists():
SQLModel.metadata.drop_all(engine)
SQLModel.metadata.create_all(engine)
Expand Down

0 comments on commit 2e780fb

Please sign in to comment.