From b63473f9e6d32970f2e6e9c43618961520345e50 Mon Sep 17 00:00:00 2001 From: Jakub Miazek Date: Fri, 3 Jun 2022 19:23:32 +0200 Subject: [PATCH] roll back commented code --- the_app/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/the_app/main.py b/the_app/main.py index add621f..6d69815 100644 --- a/the_app/main.py +++ b/the_app/main.py @@ -14,16 +14,16 @@ app.include_router(stuff_router) app.include_router(nonsense_router) -# async def start_db(): -# async with engine.begin() as conn: -# await conn.run_sync(Base.metadata.create_all) -# await engine.dispose() +async def start_db(): + async with engine.begin() as conn: + await conn.run_sync(Base.metadata.create_all) + await engine.dispose() @app.on_event("startup") async def startup_event(): logger.info("Starting up...") - # await start_db() + await start_db() @app.on_event("shutdown")