()
Run migrations in 'online' mode.

    In this scenario we need to create an Engine
    and associate a connection with the context.
Run migrations in 'online' mode.
Run migrations in online mode .
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.

    """

    connectables_and_metadata = [(backend.engine, backend.metadata)]

    for connectable, metadata in connectables_and_metadata:
        with connectable.connect() as connection:
            context.configure(
                connection=connection,
                target_metadata=metadata,
                version_table='{}_version_table'.format(plugin_name),
                process_revision_directives=process_revision_directives
            )

            with context.begin_transaction():
                context.run_migrations()
def run_migrations_online ( ) : connectables_and_metadata = [ ( backend . engine , backend . metadata ) ] for connectable , metadata in connectables_and_metadata : with connectable . connect ( ) as connection : context . configure ( connection = connection , target_metadata = metadata , version_table = '{}_version_table' . format ( plugin_name ) , process_revision_directives = process_revision_directives ) with context . begin_transaction ( ) : context . run_migrations ( )