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

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

    """

    # for the direct-to-DB use case, start a transaction on all
    # engines, then run all migrations, then commit all transactions.
    engines = {
        '': {'engine': get_engine()}
    }
    for name in bind_names:
        engines[name] = rec = {}
        rec['engine'] = get_engine(bind_key=name)

    for name, rec in engines.items():
        engine = rec['engine']
        rec['connection'] = await engine.connect().start()

    await engines['']['connection'].run_sync(do_run_migrations, engines)

    for rec in engines.values():
        await rec['connection'].close()
Run migrations in 'online' mode.

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

    
src/flask_migrate/templates/aioflask-multidb/env.py