Skip to content

Commit

Permalink
docs: remove references to SQLAlchemyAsyncConfig.create_engine (#2380)
Browse files Browse the repository at this point in the history
docs: remove references to

Co-authored-by: Peter Schutt <[email protected]>
  • Loading branch information
lsanpablo and peterschutt authored Sep 30, 2023
1 parent cf131a5 commit 98c88e1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ async def delete_author(

async def on_startup() -> None:
"""Initializes the database."""
async with sqlalchemy_config.create_engine().begin() as conn:
async with sqlalchemy_config.get_engine().begin() as conn:
await conn.run_sync(UUIDBase.metadata.create_all)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Book(UUIDAuditBase):

async def on_startup() -> None:
"""Initializes the database."""
async with sqlalchemy_config.create_engine().begin() as conn:
async with sqlalchemy_config.get_engine().begin() as conn:
await conn.run_sync(UUIDBase.metadata.create_all)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async def provide_blog_post_repo(db_session: AsyncSession) -> BlogPostRepository

async def on_startup() -> None:
"""Initializes the database."""
async with sqlalchemy_config.create_engine().begin() as conn:
async with sqlalchemy_config.get_engine().begin() as conn:
await conn.run_sync(UUIDAuditBase.metadata.create_all)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def delete_author(

def on_startup() -> None:
"""Initializes the database."""
with sqlalchemy_config.create_engine().begin() as conn:
with sqlalchemy_config.get_engine().begin() as conn:
UUIDBase.metadata.create_all(conn)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def people_handler(paginator: PersonOffsetPaginator, limit: int, offset: i

async def on_startup() -> None:
"""Initializes the database."""
async with sqlalchemy_config.create_engine().begin() as conn:
async with sqlalchemy_config.get_engine().begin() as conn:
await conn.run_sync(UUIDBase.metadata.create_all)


Expand Down

0 comments on commit 98c88e1

Please sign in to comment.