From cb889714ab34e662692fce8599e331ff66ae731e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Mon, 30 Dec 2024 23:47:18 +0200 Subject: [PATCH] Removed the existing DB in prepare() rather than start() --- examples/csvimport.py | 2 +- examples/csvimport_orm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/csvimport.py b/examples/csvimport.py index 0efe01c..e766b91 100644 --- a/examples/csvimport.py +++ b/examples/csvimport.py @@ -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() diff --git a/examples/csvimport_orm.py b/examples/csvimport_orm.py index 1bab954..7c5efad 100644 --- a/examples/csvimport_orm.py +++ b/examples/csvimport_orm.py @@ -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()