#NEWLINE# def _get_commands( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# variables = Utils . get_variables_from_file ( self . abspath , self . script_encoding ) #NEWLINE# SQL_UP = Migration . ensure_sql_unicode ( variables [ 'SQL_UP' ] , self . script_encoding ) #NEWLINE# SQL_DOWN = Migration . ensure_sql_unicode ( variables [ 'SQL_DOWN' ] , self . script_encoding ) #NEWLINE# ( SQL_UP , SQL_DOWN ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise Exception ( ( "migration file is incorrect; it does not define 'SQL_UP' or 'SQL_DOWN' (%s)" % self . abspath ) ) #NEWLINE# #UNINDENT# if ( ( variables is None ) or ( SQL_UP == '' ) ) : #NEWLINE# #INDENT# raise Exception ( ( "migration command 'SQL_UP' is empty (%s)" % self . abspath ) ) #NEWLINE# #UNINDENT# if ( ( SQL_DOWN is None ) or ( SQL_DOWN == '' ) ) : #NEWLINE# #INDENT# raise Exception ( ( "migration command 'SQL_DOWN' is empty (%s)" % self . abspath ) ) #NEWLINE# #UNINDENT# return ( SQL_UP , SQL_DOWN )