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.

    """
    if not (engine := config.attributes.get("engine")):
        engine = engine_from_config(
            config.get_section(config.config_ini_section),
            prefix="sqlalchemy.",
            poolclass=pool.NullPool,
        )

    with engine.connect() as connection:
        context.configure(
            connection=connection,
            target_metadata=target_metadata,
            version_table=prefix + "alembic_version",
        )

        with context.begin_transaction():
            context.run_migrations(config=config)
Run migrations in 'online' mode.

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

    
src/core/trulens/core/database/migrations/env.py