<s> from sqlalchemy import Boolean , Column , DateTime , Integer <EOL> from sqlalchemy import MetaData , String , Table <EOL> from nova import log as logging <EOL> meta = MetaData ( ) <EOL> builds = Table ( '<STR_LIT>' , meta , <EOL> Column ( '<STR_LIT>' , DateTime ( timezone = False ) ) , <EOL> Column ( '<STR_LIT>' , DateTime ( timezone = False ) ) , <EOL> Column ( '<STR_LIT>' , DateTime ( timezone = False ) ) , <EOL> Column ( '<STR_LIT>' , Boolean ( create_constraint = True , name = None ) ) , <EOL> Column ( '<STR_LIT:id>' , Integer ( ) , primary_key = True , nullable = False ) , <EOL> Column ( '<STR_LIT>' , <EOL> String ( length = <NUM_LIT:255> , convert_unicode = False , assert_unicode = None , <EOL> unicode_error = None , _warn_on_bytestring = False ) ) , <EOL> Column ( '<STR_LIT>' , <EOL> String ( length = <NUM_LIT:255> , convert_unicode = False , assert_unicode = None , <EOL> unicode_error = None , _warn_on_bytestring = False ) ) , <EOL> Column ( '<STR_LIT>' , <EOL> String ( length = <NUM_LIT:255> , convert_unicode = False , assert_unicode = None , <EOL> unicode_error = None , _warn_on_bytestring = False ) ) , <EOL> Column ( '<STR_LIT:version>' , <EOL> String ( length = <NUM_LIT:255> , convert_unicode = False , assert_unicode = None , <EOL> unicode_error = None , _warn_on_bytestring = False ) ) , <EOL> Column ( '<STR_LIT:url>' , <EOL> String ( length = <NUM_LIT:255> , convert_unicode = False , assert_unicode = None , <EOL> unicode_error = None , _warn_on_bytestring = False ) ) , <EOL> Column ( '<STR_LIT>' , <EOL> String ( length = <NUM_LIT:255> , convert_unicode = False , assert_unicode = None , <EOL> unicode_error = None , _warn_on_bytestring = False ) ) , <EOL> ) <EOL> architecture = Column ( '<STR_LIT>' , String ( length = <NUM_LIT:255> ) ) <EOL> def upgrade ( migrate_engine ) : <EOL> meta . bind = migrate_engine <EOL> for table in ( builds , ) : <EOL> try : <EOL> table . create ( ) <EOL> except Exception : <EOL> logging . info ( repr ( table ) ) <EOL> instances = Table ( '<STR_LIT>' , meta , autoload = True , <EOL> autoload_with = migrate_engine ) <EOL> instances . create_column ( architecture ) </s>
