Purge database on startup
This commit is contained in:
parent
b98d19f9ec
commit
32304d0c7d
1 changed files with 1 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ from src.modules import data_connection
|
|||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
# Startup
|
||||
data_connection.delete_database()
|
||||
data_connection.create_db_and_tables()
|
||||
yield
|
||||
# Shutdown
|
||||
|
|
|
|||
Loading…
Reference in a new issue