def run_migrations_online():
 connectable = settings.engine
 with connectable.connect() as connection:
  context.configure(connection=connection, target_metadata=target_metadata, compare_type=COMPARE_TYPE)
  with context.begin_transaction():
   context.run_migrations()

def run_migrations_online ( ) : connectable = settings . engine with connectable . connect ( ) as connection : context . configure ( connection = connection , target_metadata = target_metadata , compare_type = COMPARE_TYPE ) with context . begin_transaction ( ) : context . run_migrations ( )
run migrations in online mode .