def run_migrations_offline():
 set_mysql_engine()
 kwargs = dict()
 if neutron_config.database.connection:
  kwargs['url'] = neutron_config.database.connection
 else:
  kwargs['dialect_name'] = neutron_config.database.engine
 kwargs['include_object'] = include_object
 context.configure(**kwargs)
 with context.begin_transaction():
  context.run_migrations()

def run_migrations_offline ( ) : set_mysql_engine ( ) kwargs = dict ( ) if neutron_config . database . connection : kwargs [ 'url' ] = neutron_config . database . connection else : kwargs [ 'dialect_name' ] = neutron_config . database . engine kwargs [ 'include_object' ] = include_object context . configure ( ** kwargs ) with context . begin_transaction ( ) : context . run_migrations ( )
run migrations in offline mode .