#NEWLINE# def run_migrations_online( ) : #NEWLINE# #INDENT# "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    " #NEWLINE# from uliweb.manage import make_simple_application #NEWLINE# from uliweb import orm , settings #NEWLINE# name = config . get_main_option ( 'engine_name' ) #NEWLINE# make_simple_application ( project_dir = '.' ) #NEWLINE# target_metadata = orm . get_metadata ( connection ) #NEWLINE# connection = orm . get_connection ( name ) . connect ( ) #NEWLINE# context . configure ( connection = connection , target_metadata = target_metadata , compare_server_default = True , include_object = uliweb_include_object ) #NEWLINE# try : #NEWLINE# #INDENT# with context . begin_transaction ( ) : #NEWLINE# #INDENT# context . run_migrations ( ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# connection . close ( )