Skip to content

Commit

Permalink
Removed the existing DB in prepare() rather than start()
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Dec 30, 2024
1 parent a5bafe2 commit cb88971
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/csvimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self) -> None:
ready_callback=lambda bind, factory: metadata.create_all(bind),
)

async def start(self) -> None:
async def prepare(self) -> None:
# Remove the db file if it exists
if self.db_path.exists():
self.db_path.unlink()
Expand Down
2 changes: 1 addition & 1 deletion examples/csvimport_orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self) -> None:
),
)

async def start(self) -> None:
async def prepare(self) -> None:
# Remove the db file if it exists
if self.db_path.exists():
self.db_path.unlink()
Expand Down

0 comments on commit cb88971

Please sign in to comment.