"""
This script adds tables needed for Galaxy cloud functionality.
"""
from __future__ import print_function

import datetime
import logging

from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT

now = datetime.datetime.utcnow
log = logging.getLogger( __name__ )
metadata = MetaData()

CloudImage_table = Table( "cloud_image", metadata,
                          Column( "id", Integer, primary_key=True ),
                          Column( "create_time", DateTime, default=now ),
                          Column( "update_time", DateTime, default=now, onupdate=now ),
                          Column( "provider_type", TEXT ),
                          Column( "image_id", TEXT, nullable=False ),
                          Column( "manifest", TEXT ),
                          Column( "state", TEXT ),
                          Column( "architecture", TEXT ),
                          Column( "deleted", Boolean, default=False ) )

""" UserConfiguredInstance (UCI) table """
UCI_table = Table( "cloud_uci", metadata,
                   Column( "id", Integer, primary_key=True ),
                   Column( "create_time", DateTime, default=now ),
                   Column( "update_time", DateTime, default=now, onupdate=now ),
                   Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True, nullable=False ),
                   Column( "credentials_id", Integer, ForeignKey( "cloud_user_credentials.id" ), index=True ),
                   Column( "key_pair_name", TEXT ),
                   Column( "key_pair_material", TEXT ),
                   Column( "name", TEXT ),
                   Column( "state", TEXT ),
                   Column( "error", TEXT ),
                   Column( "total_size", Integer ),
                   Column( "launch_time", DateTime ),
                   Column( "deleted", Boolean, default=False ) )

CloudInstance_table = Table( "cloud_instance", metadata,
                             Column( "id", Integer, primary_key=True ),
                             Column( "create_time", DateTime, default=now ),
                             Column( "update_time", DateTime, default=now, onupdate=now ),
                             Column( "launch_time", DateTime ),
                             Column( "stop_time", DateTime ),
                             Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True, nullable=False ),
                             Column( "uci_id", Integer, ForeignKey( "cloud_uci.id" ), index=True ),
                             Column( "type", TEXT ),
                             Column( "reservation_id", TEXT ),
                             Column( "instance_id", TEXT ),
                             Column( "mi_id", Integer, ForeignKey( "cloud_image.id" ), index=True ),
                             Column( "state", TEXT ),
                             Column( "error", TEXT ),
                             Column( "public_dns", TEXT ),
                             Column( "private_dns", TEXT ),
                             Column( "security_group", TEXT ),
                             Column( "availability_zone", TEXT ) )

CloudStore_table = Table( "cloud_store", metadata,
                          Column( "id", Integer, primary_key=True ),
                          Column( "create_time", DateTime, default=now ),
                          Column( "update_time", DateTime, default=now, onupdate=now ),
                          Column( "attach_time", DateTime ),
                          Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True, nullable=False ),
                          Column( "uci_id", Integer, ForeignKey( "cloud_uci.id" ), index=True, nullable=False ),
                          Column( "volume_id", TEXT ),
                          Column( "size", Integer, nullable=False ),
                          Column( "availability_zone", TEXT ),
                          Column( "inst_id", Integer, ForeignKey( "cloud_instance.id" ) ),
                          Column( "status", TEXT ),
                          Column( "device", TEXT ),
                          Column( "space_consumed", Integer ),
                          Column( "error", TEXT ),
                          Column( "deleted", Boolean, default=False ) )

CloudSnapshot_table = Table( "cloud_snapshot", metadata,
                             Column( "id", Integer, primary_key=True ),
                             Column( "create_time", DateTime, default=now ),
                             Column( "update_time", DateTime, default=now, onupdate=now ),
                             Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True, nullable=False ),
                             Column( "uci_id", Integer, ForeignKey( "cloud_uci.id" ), index=True ),
                             Column( "store_id", Integer, ForeignKey( "cloud_store.id" ), index=True, nullable=False ),
                             Column( "snapshot_id", TEXT ),
                             Column( "status", TEXT ),
                             Column( "description", TEXT ),
                             Column( "error", TEXT ),
                             Column( "deleted", Boolean, default=False ) )

CloudUserCredentials_table = Table( "cloud_user_credentials", metadata,
                                    Column( "id", Integer, primary_key=True ),
                                    Column( "create_time", DateTime, default=now ),
                                    Column( "update_time", DateTime, default=now, onupdate=now ),
                                    Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True, nullable=False ),
                                    Column( "provider_id", Integer, ForeignKey( "cloud_provider.id" ), index=True, nullable=False ),
                                    Column( "name", TEXT ),
                                    Column( "access_key", TEXT ),
                                    Column( "secret_key", TEXT ),
                                    Column( "deleted", Boolean, default=False ) )

CloudProvider_table = Table( "cloud_provider", metadata,
                             Column( "id", Integer, primary_key=True ),
                             Column( "create_time", DateTime, default=now ),
                             Column( "update_time", DateTime, default=now, onupdate=now ),
                             Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True, nullable=False ),
                             Column( "type", TEXT, nullable=False ),
                             Column( "name", TEXT ),
                             Column( "region_connection", TEXT ),
                             Column( "region_name", TEXT ),
                             Column( "region_endpoint", TEXT ),
                             Column( "is_secure", Boolean ),
                             Column( "host", TEXT ),
                             Column( "port", Integer ),
                             Column( "proxy", TEXT ),
                             Column( "proxy_port", TEXT ),
                             Column( "proxy_user", TEXT ),
                             Column( "proxy_pass", TEXT ),
                             Column( "debug", Integer ),
                             Column( "https_connection_factory", TEXT ),
                             Column( "path", TEXT ),
                             Column( "deleted", Boolean, default=False ) )


def upgrade(migrate_engine):
    metadata.bind = migrate_engine
    print(__doc__)
    # Load existing tables
    metadata.reflect()
    try:
        CloudProvider_table.create()
        CloudUserCredentials_table.create()
        CloudImage_table.create()
        UCI_table.create()
        CloudInstance_table.create()
        CloudStore_table.create()
        CloudSnapshot_table.create()
    except Exception:
        log.exception("Creating cloud tables failed.")


def downgrade(migrate_engine):
    metadata.bind = migrate_engine
    metadata.reflect()
    try:
        CloudSnapshot_table.drop()
        CloudStore_table.drop()
        CloudInstance_table.drop()
        UCI_table.drop()
        CloudImage_table.drop()
        CloudUserCredentials_table.drop()
        CloudProvider_table.drop()
    except Exception:
        log.exception("Dropping cloud tables failed.")

[((12, 6, 12, 35), 'logging.getLogger', 'logging.getLogger', ({(12, 25, 12, 33): '__name__'}, {}), '(__name__)', False, 'import logging\n'), ((13, 11, 13, 21), 'sqlalchemy.MetaData', 'MetaData', ({}, {}), '()', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((16, 26, 16, 67), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((17, 26, 17, 72), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((18, 26, 18, 86), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((19, 26, 19, 57), 'sqlalchemy.Column', 'Column', ({(19, 34, 19, 49): '"""provider_type"""', (19, 51, 19, 55): 'TEXT'}, {}), "('provider_type', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((20, 26, 20, 68), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((21, 26, 21, 52), 'sqlalchemy.Column', 'Column', ({(21, 34, 21, 44): '"""manifest"""', (21, 46, 21, 50): 'TEXT'}, {}), "('manifest', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((22, 26, 22, 49), 'sqlalchemy.Column', 'Column', ({(22, 34, 22, 41): '"""state"""', (22, 43, 22, 47): 'TEXT'}, {}), "('state', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((23, 26, 23, 56), 'sqlalchemy.Column', 'Column', ({(23, 34, 23, 48): '"""architecture"""', (23, 50, 23, 54): 'TEXT'}, {}), "('architecture', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((24, 26, 24, 69), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((28, 19, 28, 60), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((29, 19, 29, 65), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((30, 19, 30, 79), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((33, 19, 33, 50), 'sqlalchemy.Column', 'Column', ({(33, 27, 33, 42): '"""key_pair_name"""', (33, 44, 33, 48): 'TEXT'}, {}), "('key_pair_name', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((34, 19, 34, 54), 'sqlalchemy.Column', 'Column', ({(34, 27, 34, 46): '"""key_pair_material"""', (34, 48, 34, 52): 'TEXT'}, {}), "('key_pair_material', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((35, 19, 35, 41), 'sqlalchemy.Column', 'Column', ({(35, 27, 35, 33): '"""name"""', (35, 35, 35, 39): 'TEXT'}, {}), "('name', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((36, 19, 36, 42), 'sqlalchemy.Column', 'Column', ({(36, 27, 36, 34): '"""state"""', (36, 36, 36, 40): 'TEXT'}, {}), "('state', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((37, 19, 37, 42), 'sqlalchemy.Column', 'Column', ({(37, 27, 37, 34): '"""error"""', (37, 36, 37, 40): 'TEXT'}, {}), "('error', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((38, 19, 38, 50), 'sqlalchemy.Column', 'Column', ({(38, 27, 38, 39): '"""total_size"""', (38, 41, 38, 48): 'Integer'}, {}), "('total_size', Integer)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((39, 19, 39, 52), 'sqlalchemy.Column', 'Column', ({(39, 27, 39, 40): '"""launch_time"""', (39, 42, 39, 50): 'DateTime'}, {}), "('launch_time', DateTime)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((40, 19, 40, 62), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((43, 29, 43, 70), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((44, 29, 44, 75), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((45, 29, 45, 89), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((46, 29, 46, 62), 'sqlalchemy.Column', 'Column', ({(46, 37, 46, 50): '"""launch_time"""', (46, 52, 46, 60): 'DateTime'}, {}), "('launch_time', DateTime)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((47, 29, 47, 60), 'sqlalchemy.Column', 'Column', ({(47, 37, 47, 48): '"""stop_time"""', (47, 50, 47, 58): 'DateTime'}, {}), "('stop_time', DateTime)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((50, 29, 50, 51), 'sqlalchemy.Column', 'Column', ({(50, 37, 50, 43): '"""type"""', (50, 45, 50, 49): 'TEXT'}, {}), "('type', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((51, 29, 51, 61), 'sqlalchemy.Column', 'Column', ({(51, 37, 51, 53): '"""reservation_id"""', (51, 55, 51, 59): 'TEXT'}, {}), "('reservation_id', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((52, 29, 52, 58), 'sqlalchemy.Column', 'Column', ({(52, 37, 52, 50): '"""instance_id"""', (52, 52, 52, 56): 'TEXT'}, {}), "('instance_id', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((54, 29, 54, 52), 'sqlalchemy.Column', 'Column', ({(54, 37, 54, 44): '"""state"""', (54, 46, 54, 50): 'TEXT'}, {}), "('state', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((55, 29, 55, 52), 'sqlalchemy.Column', 'Column', ({(55, 37, 55, 44): '"""error"""', (55, 46, 55, 50): 'TEXT'}, {}), "('error', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((56, 29, 56, 57), 'sqlalchemy.Column', 'Column', ({(56, 37, 56, 49): '"""public_dns"""', (56, 51, 56, 55): 'TEXT'}, {}), "('public_dns', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((57, 29, 57, 58), 'sqlalchemy.Column', 'Column', ({(57, 37, 57, 50): '"""private_dns"""', (57, 52, 57, 56): 'TEXT'}, {}), "('private_dns', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((58, 29, 58, 61), 'sqlalchemy.Column', 'Column', ({(58, 37, 58, 53): '"""security_group"""', (58, 55, 58, 59): 'TEXT'}, {}), "('security_group', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((59, 29, 59, 64), 'sqlalchemy.Column', 'Column', ({(59, 37, 59, 56): '"""availability_zone"""', (59, 58, 59, 62): 'TEXT'}, {}), "('availability_zone', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((62, 26, 62, 67), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((63, 26, 63, 72), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((64, 26, 64, 86), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((65, 26, 65, 59), 'sqlalchemy.Column', 'Column', ({(65, 34, 65, 47): '"""attach_time"""', (65, 49, 65, 57): 'DateTime'}, {}), "('attach_time', DateTime)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((68, 26, 68, 53), 'sqlalchemy.Column', 'Column', ({(68, 34, 68, 45): '"""volume_id"""', (68, 47, 68, 51): 'TEXT'}, {}), "('volume_id', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((69, 26, 69, 67), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((70, 26, 70, 61), 'sqlalchemy.Column', 'Column', ({(70, 34, 70, 53): '"""availability_zone"""', (70, 55, 70, 59): 'TEXT'}, {}), "('availability_zone', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((72, 26, 72, 50), 'sqlalchemy.Column', 'Column', ({(72, 34, 72, 42): '"""status"""', (72, 44, 72, 48): 'TEXT'}, {}), "('status', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((73, 26, 73, 50), 'sqlalchemy.Column', 'Column', ({(73, 34, 73, 42): '"""device"""', (73, 44, 73, 48): 'TEXT'}, {}), "('device', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((74, 26, 74, 61), 'sqlalchemy.Column', 'Column', ({(74, 34, 74, 50): '"""space_consumed"""', (74, 52, 74, 59): 'Integer'}, {}), "('space_consumed', Integer)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((75, 26, 75, 49), 'sqlalchemy.Column', 'Column', ({(75, 34, 75, 41): '"""error"""', (75, 43, 75, 47): 'TEXT'}, {}), "('error', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((76, 26, 76, 69), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((79, 29, 79, 70), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((80, 29, 80, 75), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((81, 29, 81, 89), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((85, 29, 85, 58), 'sqlalchemy.Column', 'Column', ({(85, 37, 85, 50): '"""snapshot_id"""', (85, 52, 85, 56): 'TEXT'}, {}), "('snapshot_id', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((86, 29, 86, 53), 'sqlalchemy.Column', 'Column', ({(86, 37, 86, 45): '"""status"""', (86, 47, 86, 51): 'TEXT'}, {}), "('status', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((87, 29, 87, 58), 'sqlalchemy.Column', 'Column', ({(87, 37, 87, 50): '"""description"""', (87, 52, 87, 56): 'TEXT'}, {}), "('description', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((88, 29, 88, 52), 'sqlalchemy.Column', 'Column', ({(88, 37, 88, 44): '"""error"""', (88, 46, 88, 50): 'TEXT'}, {}), "('error', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((89, 29, 89, 72), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((92, 36, 92, 77), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((93, 36, 93, 82), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((94, 36, 94, 96), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((97, 36, 97, 58), 'sqlalchemy.Column', 'Column', ({(97, 44, 97, 50): '"""name"""', (97, 52, 97, 56): 'TEXT'}, {}), "('name', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((98, 36, 98, 64), 'sqlalchemy.Column', 'Column', ({(98, 44, 98, 56): '"""access_key"""', (98, 58, 98, 62): 'TEXT'}, {}), "('access_key', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((99, 36, 99, 64), 'sqlalchemy.Column', 'Column', ({(99, 44, 99, 56): '"""secret_key"""', (99, 58, 99, 62): 'TEXT'}, {}), "('secret_key', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((100, 36, 100, 79), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((103, 29, 103, 70), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((104, 29, 104, 75), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((105, 29, 105, 89), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((107, 29, 107, 67), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((108, 29, 108, 51), 'sqlalchemy.Column', 'Column', ({(108, 37, 108, 43): '"""name"""', (108, 45, 108, 49): 'TEXT'}, {}), "('name', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((109, 29, 109, 64), 'sqlalchemy.Column', 'Column', ({(109, 37, 109, 56): '"""region_connection"""', (109, 58, 109, 62): 'TEXT'}, {}), "('region_connection', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((110, 29, 110, 58), 'sqlalchemy.Column', 'Column', ({(110, 37, 110, 50): '"""region_name"""', (110, 52, 110, 56): 'TEXT'}, {}), "('region_name', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((111, 29, 111, 62), 'sqlalchemy.Column', 'Column', ({(111, 37, 111, 54): '"""region_endpoint"""', (111, 56, 111, 60): 'TEXT'}, {}), "('region_endpoint', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((112, 29, 112, 59), 'sqlalchemy.Column', 'Column', ({(112, 37, 112, 48): '"""is_secure"""', (112, 50, 112, 57): 'Boolean'}, {}), "('is_secure', Boolean)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((113, 29, 113, 51), 'sqlalchemy.Column', 'Column', ({(113, 37, 113, 43): '"""host"""', (113, 45, 113, 49): 'TEXT'}, {}), "('host', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((114, 29, 114, 54), 'sqlalchemy.Column', 'Column', ({(114, 37, 114, 43): '"""port"""', (114, 45, 114, 52): 'Integer'}, {}), "('port', Integer)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((115, 29, 115, 52), 'sqlalchemy.Column', 'Column', ({(115, 37, 115, 44): '"""proxy"""', (115, 46, 115, 50): 'TEXT'}, {}), "('proxy', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((116, 29, 116, 57), 'sqlalchemy.Column', 'Column', ({(116, 37, 116, 49): '"""proxy_port"""', (116, 51, 116, 55): 'TEXT'}, {}), "('proxy_port', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((117, 29, 117, 57), 'sqlalchemy.Column', 'Column', ({(117, 37, 117, 49): '"""proxy_user"""', (117, 51, 117, 55): 'TEXT'}, {}), "('proxy_user', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((118, 29, 118, 57), 'sqlalchemy.Column', 'Column', ({(118, 37, 118, 49): '"""proxy_pass"""', (118, 51, 118, 55): 'TEXT'}, {}), "('proxy_pass', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((119, 29, 119, 55), 'sqlalchemy.Column', 'Column', ({(119, 37, 119, 44): '"""debug"""', (119, 46, 119, 53): 'Integer'}, {}), "('debug', Integer)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((120, 29, 120, 71), 'sqlalchemy.Column', 'Column', ({(120, 37, 120, 63): '"""https_connection_factory"""', (120, 65, 120, 69): 'TEXT'}, {}), "('https_connection_factory', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((121, 29, 121, 51), 'sqlalchemy.Column', 'Column', ({(121, 37, 121, 43): '"""path"""', (121, 45, 121, 49): 'TEXT'}, {}), "('path', TEXT)", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((122, 29, 122, 72), 'sqlalchemy.Column', 'Column', (), '', False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((31, 47, 31, 77), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(31, 59, 31, 75): '"""galaxy_user.id"""'}, {}), "('galaxy_user.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((32, 54, 32, 95), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(32, 66, 32, 93): '"""cloud_user_credentials.id"""'}, {}), "('cloud_user_credentials.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((48, 57, 48, 87), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(48, 69, 48, 85): '"""galaxy_user.id"""'}, {}), "('galaxy_user.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((49, 56, 49, 84), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(49, 68, 49, 82): '"""cloud_uci.id"""'}, {}), "('cloud_uci.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((53, 55, 53, 85), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(53, 67, 53, 83): '"""cloud_image.id"""'}, {}), "('cloud_image.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((66, 54, 66, 84), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(66, 66, 66, 82): '"""galaxy_user.id"""'}, {}), "('galaxy_user.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((67, 53, 67, 81), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(67, 65, 67, 79): '"""cloud_uci.id"""'}, {}), "('cloud_uci.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((71, 54, 71, 87), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(71, 66, 71, 85): '"""cloud_instance.id"""'}, {}), "('cloud_instance.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((82, 57, 82, 87), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(82, 69, 82, 85): '"""galaxy_user.id"""'}, {}), "('galaxy_user.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((83, 56, 83, 84), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(83, 68, 83, 82): '"""cloud_uci.id"""'}, {}), "('cloud_uci.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((84, 58, 84, 88), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(84, 70, 84, 86): '"""cloud_store.id"""'}, {}), "('cloud_store.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((95, 64, 95, 94), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(95, 76, 95, 92): '"""galaxy_user.id"""'}, {}), "('galaxy_user.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((96, 68, 96, 101), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(96, 80, 96, 99): '"""cloud_provider.id"""'}, {}), "('cloud_provider.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n'), ((106, 57, 106, 87), 'sqlalchemy.ForeignKey', 'ForeignKey', ({(106, 69, 106, 85): '"""galaxy_user.id"""'}, {}), "('galaxy_user.id')", False, 'from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT\n')]