diff options
Diffstat (limited to 'alembic/env.py')
-rw-r--r-- | alembic/env.py | 3 |
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. |