

def run_migrations_online():
    "Run migrations in 'online' mode.\n\n    In this scenario we need to create an Engine\n    and associate a connection with the context.\n\n    "
    engine = current_app.extensions['sqlalchemy'].db.engine
    connection = engine.connect()
    context.configure(connection=connection, target_metadata=target_metadata)
    try:
        with context.begin_transaction():
            context.run_migrations()
    finally:
        connection.close()

dataset/ETHPy150Open aromanovich/kozmic-ci/migrations/env.py run_migrations_online/original