in migrations/env.py [0:0]
def run_migrations_online() -> None:
"""Run migrations in 'online' mode."""
configuration = alembic_config.get_section(alembic_config.config_ini_section) or {}
configuration["sqlalchemy.url"] = sync_sqlalchemy_url
connectable = sqlalchemy.engine_from_config(
configuration,
prefix="sqlalchemy.",
poolclass=sqlalchemy.pool.NullPool,
)
with connectable.connect() as connection:
alembic.context.configure(
connection=connection,
target_metadata=target_metadata,
render_item=render_item_override,
process_revision_directives=process_revision_directives_custom_naming,
)
with alembic.context.begin_transaction():
alembic.context.run_migrations()