aboutsummaryrefslogtreecommitdiffstats
path: root/alembic
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-04-07 22:50:26 +0100
committerGravatar Joe Banks <[email protected]>2024-04-07 22:50:26 +0100
commit207897265f2b368ea9e618cb6c94c4d624825e38 (patch)
treea4be4dfabcb0e8d900f2fa2189d79ca8b6b63e08 /alembic
parentBump CI Python version (diff)
Fix new reported errors from Ruff version bump
Diffstat (limited to 'alembic')
-rw-r--r--alembic/env.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/alembic/env.py b/alembic/env.py
index efe2573..f6871e1 100644
--- a/alembic/env.py
+++ b/alembic/env.py
@@ -30,6 +30,7 @@ target_metadata = Base.metadata
config.set_main_option("sqlalchemy.url", build_db_uri())
+
def do_run_migrations(connection: Connection) -> None:
"""Run migrations."""
context.configure(connection=connection, target_metadata=target_metadata)
@@ -37,6 +38,7 @@ def do_run_migrations(connection: Connection) -> None:
with context.begin_transaction():
context.run_migrations()
+
async def run_async_migrations() -> None:
"""Run migrations asynchronously using the asyncpg driver."""
connectable = async_engine_from_config(
@@ -50,6 +52,7 @@ async def run_async_migrations() -> None:
await connectable.dispose()
+
def run_migrations_offline() -> None:
"""
Run migrations in 'offline' mode.