INNER CODE UNIT · Python

do_run_migrations

rafsaf/minimal-fastapi-postgres-template · alembic/env.py:60

def do_run_migrations(connection: Connection | None) -> None:
    context.configure(
        connection=connection, target_metadata=target_metadata, compare_type=True
    )

    with context.begin_transaction():
        context.run_migrations()


async def run_migrations_online() -> None:
    """Run migrations in 'online' mode.

    In this scenario we need to create an Engine
    and associate a connection with the context.

    """
    configuration = config.get_section(config.config_ini_section)
    assert configuration

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…