"""
The SQLAlchemy table objects for the CodaLab bundle system tables.
"""
# TODO: Replace String and Text columns with Unicode and UnicodeText as appropriate
# This way, SQLAlchemy will automatically perform conversions to and from UTF-8
# encoding, or use appropriate database engine-specific data types for Unicode
# data. Currently, only worksheet.title uses the Unicode column type.
from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint
from sqlalchemy.types import (
    BigInteger,
    Boolean,
    DateTime,
    Enum,
    Float,
    Integer,
    LargeBinary,
    String,
    Text,
    Unicode,
)
from sqlalchemy.sql.schema import ForeignKeyConstraint

db_metadata = MetaData()

bundle = Table(
    'bundle',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('uuid', String(63), nullable=False),
    Column('bundle_type', String(63), nullable=False),
    # The command will be NULL except for run bundles.
    Column('command', Text, nullable=True),
    # The data_hash will be NULL if the bundle's value is still being computed.
    Column('data_hash', String(63), nullable=True),
    Column('state', String(63), nullable=False),
    Column('owner_id', String(255), nullable=True),
    Column('is_anonymous', Boolean, nullable=False, default=False),
    UniqueConstraint('uuid', name='uix_1'),
    Index('bundle_data_hash_index', 'data_hash'),
    Index('state_index', 'state'),  # Needed for the bundle manager.
)

# Includes things like name, description, etc.
bundle_metadata = Table(
    'bundle_metadata',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('bundle_uuid', String(63), ForeignKey(bundle.c.uuid), nullable=False),
    Column('metadata_key', String(63), nullable=False),
    Column('metadata_value', Text, nullable=False),
    Index('metadata_kv_index', 'metadata_key', 'metadata_value', mysql_length=63),
)

# For each child_uuid, we have: key = child_path, target = (parent_uuid, parent_path)
bundle_dependency = Table(
    'bundle_dependency',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('child_uuid', String(63), ForeignKey(bundle.c.uuid), nullable=False),
    Column('child_path', Text, nullable=False),
    # Deliberately omit ForeignKey(bundle.c.uuid), because bundles can have
    # dependencies to bundles not (yet) in the system.
    Column('parent_uuid', String(63), nullable=False),
    Column('parent_path', Text, nullable=False),
)

# The worksheet table does not have many columns now, but it will eventually
# include columns for owner, group, permissions, etc.
worksheet = Table(
    'worksheet',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('uuid', String(63), nullable=False),
    Column('name', String(255), nullable=False),
    Column('owner_id', String(255), nullable=True),
    Column(
        'title', Unicode(255), nullable=True
    ),  # Short human-readable description of the worksheet
    Column(
        'frozen', DateTime, nullable=True
    ),  # When the worksheet was frozen (forever immutable) if it is.
    Column('is_anonymous', Boolean, nullable=False, default=False),
    Column(
        'date_created', DateTime
    ),  # When the worksheet was created; Set to null if the worksheet created before v0.5.31; Set to current timestamp by default
    Column(
        'date_last_modified', DateTime
    ),  # When the worksheet was last modified; Set to null if the worksheet created before v0.5.31; Set to current_timestamp by default
    UniqueConstraint('uuid', name='uix_1'),
    Index('worksheet_name_index', 'name'),
    Index('worksheet_owner_index', 'owner_id'),
)

worksheet_item = Table(
    'worksheet_item',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('worksheet_uuid', String(63), ForeignKey(worksheet.c.uuid), nullable=False),
    # A worksheet item is either:
    # - type = bundle (bundle_uuid != null)
    # - type = worksheet (subworksheet_uuid != null)
    # - type = markup (value != null)
    # - type = directive (value != null)
    # Deliberately omit ForeignKey(bundle.c.uuid), because worksheets can contain
    # bundles and worksheets not (yet) in the system.
    Column('bundle_uuid', String(63), nullable=True),
    Column('subworksheet_uuid', String(63), nullable=True),
    Column('value', Text, nullable=False),  # TODO: make this nullable
    Column('type', String(20), nullable=False),
    Column('sort_key', Integer, nullable=True),
    Index('worksheet_item_worksheet_uuid_index', 'worksheet_uuid'),
    Index('worksheet_item_bundle_uuid_index', 'bundle_uuid'),
    Index('worksheet_item_subworksheet_uuid_index', 'subworksheet_uuid'),
)

# Worksheet tags
worksheet_tag = Table(
    'worksheet_tag',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('worksheet_uuid', String(63), ForeignKey(worksheet.c.uuid), nullable=False),
    Column('tag', String(63), nullable=False),
    Index('worksheet_tag_worksheet_uuid_index', 'worksheet_uuid'),
    Index('worksheet_tag_tag_index', 'tag'),
)

group = Table(
    'group',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('uuid', String(63), nullable=False),
    Column('name', String(255), nullable=False),
    Column('user_defined', Boolean),
    Column('owner_id', String(255), nullable=True),
    UniqueConstraint('uuid', name='uix_1'),
    Index('group_name_index', 'name'),
    Index('group_owner_id_index', 'owner_id'),
)

user_group = Table(
    'user_group',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('group_uuid', String(63), ForeignKey(group.c.uuid), nullable=False),
    Column('user_id', String(63), ForeignKey("user.user_id"), nullable=False),
    # Whether a user is able to modify this group.
    Column('is_admin', Boolean),
    Index('group_uuid_index', 'group_uuid'),
    Index('user_id_index', 'user_id'),
)

# Permissions for bundles
group_bundle_permission = Table(
    'group_bundle_permission',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('group_uuid', String(63), ForeignKey(group.c.uuid), nullable=False),
    # Reference to a bundle
    Column('object_uuid', String(63), ForeignKey(bundle.c.uuid), nullable=False),
    # Permissions encoded as integer (see below)
    Column('permission', Integer, nullable=False),
)

# Permissions for worksheets
group_object_permission = Table(
    'group_object_permission',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('group_uuid', String(63), ForeignKey(group.c.uuid), nullable=False),
    # Reference to a worksheet object
    Column('object_uuid', String(63), ForeignKey(worksheet.c.uuid), nullable=False),
    # Permissions encoded as integer (see below)
    Column('permission', Integer, nullable=False),
)

# A permission value is one of the following: none (0), read (1), or all (2).
GROUP_OBJECT_PERMISSION_NONE = 0x00
GROUP_OBJECT_PERMISSION_READ = 0x01
GROUP_OBJECT_PERMISSION_ALL = 0x02

# A notifications value is one of the following:
NOTIFICATIONS_NONE = 0x00  # Receive no notifications
NOTIFICATIONS_IMPORTANT = 0x01  # Receive only important notifications
NOTIFICATIONS_GENERAL = 0x02  # Receive general notifications (new features)

# Store information about users.
user = Table(
    'user',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    # Basic information
    Column('user_id', String(63), nullable=False),
    Column('user_name', String(63), nullable=False, unique=True),
    Column(
        'email', String(254), nullable=False, unique=True
    ),  # Length of 254 to be compliant with RFC3696/5321
    Column(
        'notifications', Integer, nullable=False, default=NOTIFICATIONS_GENERAL
    ),  # Which emails user wants to receive
    Column('last_login', DateTime),  # Null if user has never logged in
    Column(
        'is_active', Boolean, nullable=False, default=True
    ),  # Set to False instead of deleting users to maintain foreign key integrity
    Column('first_name', String(30, convert_unicode=True)),
    Column('last_name', String(30, convert_unicode=True)),
    Column('date_joined', DateTime, nullable=False),
    Column('has_access', Boolean, default=False, nullable=True),
    Column('is_verified', Boolean, nullable=False, default=False),
    Column('is_superuser', Boolean, nullable=False, default=False),
    Column('password', String(128), nullable=False),
    # Additional information
    Column('affiliation', String(255, convert_unicode=True), nullable=True),
    Column('url', String(255, convert_unicode=True), nullable=True),
    # Quotas
    Column('time_quota', Float, nullable=False),  # Number of seconds allowed
    Column('parallel_run_quota', Integer, nullable=False),  # Number of parallel jobs allowed
    Column('time_used', Float, nullable=False),  # Number of seconds already used
    Column('disk_quota', Float, nullable=False),  # Number of bytes allowed
    Column('disk_used', Float, nullable=False),  # Number of bytes already used
    Index('user_user_id_index', 'user_id'),
    Index('user_user_name_index', 'user_name'),
    UniqueConstraint('user_id', name='uix_1'),
)

# Stores (email) verification keys
user_verification = Table(
    'user_verification',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('user_id', String(63), ForeignKey(user.c.user_id), nullable=False),
    Column('date_created', DateTime, nullable=False),
    Column('date_sent', DateTime, nullable=True),
    Column('key', String(64), nullable=False),
)

# Stores password reset codes
user_reset_code = Table(
    'user_reset_code',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('user_id', String(63), ForeignKey(user.c.user_id), nullable=False),
    Column('date_created', DateTime, nullable=False),
    Column('code', String(64), nullable=False),
)

# OAuth2 Tables

oauth2_client = Table(
    'oauth2_client',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('client_id', String(63), nullable=False),
    Column('name', String(63), nullable=True),
    Column('secret', String(255), nullable=True),
    Column('user_id', String(63), ForeignKey(user.c.user_id), nullable=True),
    Column(
        'grant_type',
        Enum("authorization_code", "password", "client_credentials", "refresh_token"),
        nullable=False,
    ),
    Column('response_type', Enum("code", "token"), nullable=False),
    Column('scopes', Text, nullable=False),  # comma-separated list of allowed scopes
    Column('redirect_uris', Text, nullable=False),  # comma-separated list of allowed redirect URIs
    UniqueConstraint('client_id', name='uix_1'),
)

oauth2_token = Table(
    'oauth2_token',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('client_id', String(63), ForeignKey(oauth2_client.c.client_id), nullable=False),
    Column('user_id', String(63), ForeignKey(user.c.user_id), nullable=False),
    Column('scopes', Text, nullable=False),
    Column('access_token', String(255), unique=True),
    Column('refresh_token', String(255), unique=True),
    Column('expires', DateTime, nullable=False),
)

oauth2_auth_code = Table(
    'oauth2_auth_code',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),
    Column('client_id', String(63), ForeignKey(oauth2_client.c.client_id), nullable=False),
    Column('user_id', String(63), ForeignKey(user.c.user_id), nullable=False),
    Column('scopes', Text, nullable=False),
    Column('code', String(100), nullable=False),
    Column('expires', DateTime, nullable=False),
    Column('redirect_uri', String(255), nullable=False),
)

# Store information about users' questions or feedback.
chat = Table(
    'chat',
    db_metadata,
    Column(
        'id',
        BigInteger().with_variant(Integer, "sqlite"),
        primary_key=True,
        nullable=False,
        autoincrement=True,
    ),  # Primary key
    Column('time', DateTime, nullable=False),  # When did the user send this query?
    Column('sender_user_id', String(63), nullable=True),  # Who sent it?
    Column('recipient_user_id', String(63), nullable=True),  # Who received it?
    Column('message', Text, nullable=False),  # What's the content of the chat?
    Column(
        'worksheet_uuid', String(63), nullable=True
    ),  # What is the id of the worksheet that the sender is on?
    Column(
        'bundle_uuid', String(63), nullable=True
    ),  # What is the id of the bundle that the sender is on?
)

# Store information about workers.
worker = Table(
    'worker',
    db_metadata,
    Column('user_id', String(63), ForeignKey(user.c.user_id), primary_key=True, nullable=False),
    Column('worker_id', String(127), primary_key=True, nullable=False),
    Column('group_uuid', String(63), ForeignKey(group.c.uuid), nullable=True),
    Column('tag', Text, nullable=True),  # Tag that allows for scheduling runs on specific workers.
    Column('cpus', Integer, nullable=False),  # Number of CPUs on worker.
    Column('gpus', Integer, nullable=False),  # Number of GPUs on worker.
    Column('memory_bytes', BigInteger, nullable=False),  # Total memory of worker.
    Column('free_disk_bytes', BigInteger, nullable=True),  # Available disk space on worker.
    Column(
        'checkin_time', DateTime, nullable=False
    ),  # When the worker last checked in with the bundle service.
    Column('socket_id', Integer, nullable=False),  # Socket ID worker listens for messages on.
    Column(
        'shared_file_system', Boolean, nullable=False
    ),  # Whether the worker and the server have a shared filesystem.
    Column(
        'tag_exclusive', Boolean, nullable=False
    ),  # Whether worker runs bundles if and only if they match tags.
    Column(
        'exit_after_num_runs', Integer, nullable=False
    ),  # Number of jobs allowed to run on worker.
    Column('is_terminating', Boolean, nullable=False),
)

# Store information about all sockets currently allocated to each worker.
worker_socket = Table(
    'worker_socket',
    db_metadata,
    Column('user_id', String(63), ForeignKey(user.c.user_id), nullable=False),
    Column('worker_id', String(127), nullable=False),
    # No foreign key constraint on the worker table so that we can create a socket
    # for the worker before adding the worker to the worker table.
    Column('socket_id', Integer, primary_key=True, nullable=False),
)

# Store information about the bundles currently running on each worker.
worker_run = Table(
    'worker_run',
    db_metadata,
    Column('user_id', String(63), ForeignKey(user.c.user_id), nullable=False),
    Column('worker_id', String(127), nullable=False),
    ForeignKeyConstraint(['user_id', 'worker_id'], ['worker.user_id', 'worker.worker_id']),
    Column('run_uuid', String(63), ForeignKey(bundle.c.uuid), nullable=False),
    Index('uuid_index', 'run_uuid'),
)

# Store information about the dependencies available on each worker.
worker_dependency = Table(
    'worker_dependency',
    db_metadata,
    Column('user_id', String(63), ForeignKey(user.c.user_id), primary_key=True, nullable=False),
    Column('worker_id', String(127), primary_key=True, nullable=False),
    ForeignKeyConstraint(['user_id', 'worker_id'], ['worker.user_id', 'worker.worker_id']),
    # Serialized list of dependencies for the user/worker combination.
    # See WorkerModel for the serialization method.
    Column('dependencies', LargeBinary, nullable=False),
)

[((704, 714), 'sqlalchemy.MetaData', 'MetaData', ([], {}), '()\n', (712, 714), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((1090, 1128), 'sqlalchemy.Column', 'Column', (['"""command"""', 'Text'], {'nullable': '(True)'}), "('command', Text, nullable=True)\n", (1096, 1128), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((1367, 1429), 'sqlalchemy.Column', 'Column', (['"""is_anonymous"""', 'Boolean'], {'nullable': '(False)', 'default': '(False)'}), "('is_anonymous', Boolean, nullable=False, default=False)\n", (1373, 1429), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((1435, 1473), 'sqlalchemy.UniqueConstraint', 'UniqueConstraint', (['"""uuid"""'], {'name': '"""uix_1"""'}), "('uuid', name='uix_1')\n", (1451, 1473), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((1479, 1523), 'sqlalchemy.Index', 'Index', (['"""bundle_data_hash_index"""', '"""data_hash"""'], {}), "('bundle_data_hash_index', 'data_hash')\n", (1484, 1523), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((1529, 1558), 'sqlalchemy.Index', 'Index', (['"""state_index"""', '"""state"""'], {}), "('state_index', 'state')\n", (1534, 1558), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((2016, 2062), 'sqlalchemy.Column', 'Column', (['"""metadata_value"""', 'Text'], {'nullable': '(False)'}), "('metadata_value', Text, nullable=False)\n", (2022, 2062), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((2068, 2145), 'sqlalchemy.Index', 'Index', (['"""metadata_kv_index"""', '"""metadata_key"""', '"""metadata_value"""'], {'mysql_length': '(63)'}), "('metadata_kv_index', 'metadata_key', 'metadata_value', mysql_length=63)\n", (2073, 2145), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((2555, 2597), 'sqlalchemy.Column', 'Column', (['"""child_path"""', 'Text'], {'nullable': '(False)'}), "('child_path', Text, nullable=False)\n", (2561, 2597), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((2789, 2832), 'sqlalchemy.Column', 'Column', (['"""parent_path"""', 'Text'], {'nullable': '(False)'}), "('parent_path', Text, nullable=False)\n", (2795, 2832), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((3456, 3497), 'sqlalchemy.Column', 'Column', (['"""frozen"""', 'DateTime'], {'nullable': '(True)'}), "('frozen', DateTime, nullable=True)\n", (3462, 3497), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((3580, 3642), 'sqlalchemy.Column', 'Column', (['"""is_anonymous"""', 'Boolean'], {'nullable': '(False)', 'default': '(False)'}), "('is_anonymous', Boolean, nullable=False, default=False)\n", (3586, 3642), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((3648, 3680), 'sqlalchemy.Column', 'Column', (['"""date_created"""', 'DateTime'], {}), "('date_created', DateTime)\n", (3654, 3680), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((3824, 3862), 'sqlalchemy.Column', 'Column', (['"""date_last_modified"""', 'DateTime'], {}), "('date_last_modified', DateTime)\n", (3830, 3862), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((4012, 4050), 'sqlalchemy.UniqueConstraint', 'UniqueConstraint', (['"""uuid"""'], {'name': '"""uix_1"""'}), "('uuid', name='uix_1')\n", (4028, 4050), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((4056, 4093), 'sqlalchemy.Index', 'Index', (['"""worksheet_name_index"""', '"""name"""'], {}), "('worksheet_name_index', 'name')\n", (4061, 4093), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((4099, 4141), 'sqlalchemy.Index', 'Index', (['"""worksheet_owner_index"""', '"""owner_id"""'], {}), "('worksheet_owner_index', 'owner_id')\n", (4104, 4141), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((4926, 4963), 'sqlalchemy.Column', 'Column', (['"""value"""', 'Text'], {'nullable': '(False)'}), "('value', Text, nullable=False)\n", (4932, 4963), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((5045, 5087), 'sqlalchemy.Column', 'Column', (['"""sort_key"""', 'Integer'], {'nullable': '(True)'}), "('sort_key', Integer, nullable=True)\n", (5051, 5087), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((5093, 5155), 'sqlalchemy.Index', 'Index', (['"""worksheet_item_worksheet_uuid_index"""', '"""worksheet_uuid"""'], {}), "('worksheet_item_worksheet_uuid_index', 'worksheet_uuid')\n", (5098, 5155), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((5161, 5217), 'sqlalchemy.Index', 'Index', (['"""worksheet_item_bundle_uuid_index"""', '"""bundle_uuid"""'], {}), "('worksheet_item_bundle_uuid_index', 'bundle_uuid')\n", (5166, 5217), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((5223, 5291), 'sqlalchemy.Index', 'Index', (['"""worksheet_item_subworksheet_uuid_index"""', '"""subworksheet_uuid"""'], {}), "('worksheet_item_subworksheet_uuid_index', 'subworksheet_uuid')\n", (5228, 5291), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((5678, 5739), 'sqlalchemy.Index', 'Index', (['"""worksheet_tag_worksheet_uuid_index"""', '"""worksheet_uuid"""'], {}), "('worksheet_tag_worksheet_uuid_index', 'worksheet_uuid')\n", (5683, 5739), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((5745, 5784), 'sqlalchemy.Index', 'Index', (['"""worksheet_tag_tag_index"""', '"""tag"""'], {}), "('worksheet_tag_tag_index', 'tag')\n", (5750, 5784), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((6100, 6131), 'sqlalchemy.Column', 'Column', (['"""user_defined"""', 'Boolean'], {}), "('user_defined', Boolean)\n", (6106, 6131), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((6189, 6227), 'sqlalchemy.UniqueConstraint', 'UniqueConstraint', (['"""uuid"""'], {'name': '"""uix_1"""'}), "('uuid', name='uix_1')\n", (6205, 6227), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((6233, 6266), 'sqlalchemy.Index', 'Index', (['"""group_name_index"""', '"""name"""'], {}), "('group_name_index', 'name')\n", (6238, 6266), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((6272, 6313), 'sqlalchemy.Index', 'Index', (['"""group_owner_id_index"""', '"""owner_id"""'], {}), "('group_owner_id_index', 'owner_id')\n", (6277, 6313), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((6752, 6779), 'sqlalchemy.Column', 'Column', (['"""is_admin"""', 'Boolean'], {}), "('is_admin', Boolean)\n", (6758, 6779), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((6785, 6824), 'sqlalchemy.Index', 'Index', (['"""group_uuid_index"""', '"""group_uuid"""'], {}), "('group_uuid_index', 'group_uuid')\n", (6790, 6824), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((6830, 6863), 'sqlalchemy.Index', 'Index', (['"""user_id_index"""', '"""user_id"""'], {}), "('user_id_index', 'user_id')\n", (6835, 6863), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((7383, 7428), 'sqlalchemy.Column', 'Column', (['"""permission"""', 'Integer'], {'nullable': '(False)'}), "('permission', Integer, nullable=False)\n", (7389, 7428), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((7964, 8009), 'sqlalchemy.Column', 'Column', (['"""permission"""', 'Integer'], {'nullable': '(False)'}), "('permission', Integer, nullable=False)\n", (7970, 8009), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((8966, 9045), 'sqlalchemy.Column', 'Column', (['"""notifications"""', 'Integer'], {'nullable': '(False)', 'default': 'NOTIFICATIONS_GENERAL'}), "('notifications', Integer, nullable=False, default=NOTIFICATIONS_GENERAL)\n", (8972, 9045), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((9103, 9133), 'sqlalchemy.Column', 'Column', (['"""last_login"""', 'DateTime'], {}), "('last_login', DateTime)\n", (9109, 9133), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((9175, 9233), 'sqlalchemy.Column', 'Column', (['"""is_active"""', 'Boolean'], {'nullable': '(False)', 'default': '(True)'}), "('is_active', Boolean, nullable=False, default=True)\n", (9181, 9233), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((9448, 9495), 'sqlalchemy.Column', 'Column', (['"""date_joined"""', 'DateTime'], {'nullable': '(False)'}), "('date_joined', DateTime, nullable=False)\n", (9454, 9495), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((9501, 9560), 'sqlalchemy.Column', 'Column', (['"""has_access"""', 'Boolean'], {'default': '(False)', 'nullable': '(True)'}), "('has_access', Boolean, default=False, nullable=True)\n", (9507, 9560), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((9566, 9627), 'sqlalchemy.Column', 'Column', (['"""is_verified"""', 'Boolean'], {'nullable': '(False)', 'default': '(False)'}), "('is_verified', Boolean, nullable=False, default=False)\n", (9572, 9627), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((9633, 9695), 'sqlalchemy.Column', 'Column', (['"""is_superuser"""', 'Boolean'], {'nullable': '(False)', 'default': '(False)'}), "('is_superuser', Boolean, nullable=False, default=False)\n", (9639, 9695), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((9942, 9985), 'sqlalchemy.Column', 'Column', (['"""time_quota"""', 'Float'], {'nullable': '(False)'}), "('time_quota', Float, nullable=False)\n", (9948, 9985), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10020, 10073), 'sqlalchemy.Column', 'Column', (['"""parallel_run_quota"""', 'Integer'], {'nullable': '(False)'}), "('parallel_run_quota', Integer, nullable=False)\n", (10026, 10073), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10114, 10156), 'sqlalchemy.Column', 'Column', (['"""time_used"""', 'Float'], {'nullable': '(False)'}), "('time_used', Float, nullable=False)\n", (10120, 10156), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10196, 10239), 'sqlalchemy.Column', 'Column', (['"""disk_quota"""', 'Float'], {'nullable': '(False)'}), "('disk_quota', Float, nullable=False)\n", (10202, 10239), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10272, 10314), 'sqlalchemy.Column', 'Column', (['"""disk_used"""', 'Float'], {'nullable': '(False)'}), "('disk_used', Float, nullable=False)\n", (10278, 10314), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10352, 10390), 'sqlalchemy.Index', 'Index', (['"""user_user_id_index"""', '"""user_id"""'], {}), "('user_user_id_index', 'user_id')\n", (10357, 10390), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10396, 10438), 'sqlalchemy.Index', 'Index', (['"""user_user_name_index"""', '"""user_name"""'], {}), "('user_user_name_index', 'user_name')\n", (10401, 10438), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10444, 10485), 'sqlalchemy.UniqueConstraint', 'UniqueConstraint', (['"""user_id"""'], {'name': '"""uix_1"""'}), "('user_id', name='uix_1')\n", (10460, 10485), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10842, 10890), 'sqlalchemy.Column', 'Column', (['"""date_created"""', 'DateTime'], {'nullable': '(False)'}), "('date_created', DateTime, nullable=False)\n", (10848, 10890), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10896, 10940), 'sqlalchemy.Column', 'Column', (['"""date_sent"""', 'DateTime'], {'nullable': '(True)'}), "('date_sent', DateTime, nullable=True)\n", (10902, 10940), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((11335, 11383), 'sqlalchemy.Column', 'Column', (['"""date_created"""', 'DateTime'], {'nullable': '(False)'}), "('date_created', DateTime, nullable=False)\n", (11341, 11383), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((12131, 12169), 'sqlalchemy.Column', 'Column', (['"""scopes"""', 'Text'], {'nullable': '(False)'}), "('scopes', Text, nullable=False)\n", (12137, 12169), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((12217, 12262), 'sqlalchemy.Column', 'Column', (['"""redirect_uris"""', 'Text'], {'nullable': '(False)'}), "('redirect_uris', Text, nullable=False)\n", (12223, 12262), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((12317, 12360), 'sqlalchemy.UniqueConstraint', 'UniqueConstraint', (['"""client_id"""'], {'name': '"""uix_1"""'}), "('client_id', name='uix_1')\n", (12333, 12360), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((12764, 12802), 'sqlalchemy.Column', 'Column', (['"""scopes"""', 'Text'], {'nullable': '(False)'}), "('scopes', Text, nullable=False)\n", (12770, 12802), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((12917, 12960), 'sqlalchemy.Column', 'Column', (['"""expires"""', 'DateTime'], {'nullable': '(False)'}), "('expires', DateTime, nullable=False)\n", (12923, 12960), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((13372, 13410), 'sqlalchemy.Column', 'Column', (['"""scopes"""', 'Text'], {'nullable': '(False)'}), "('scopes', Text, nullable=False)\n", (13378, 13410), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((13465, 13508), 'sqlalchemy.Column', 'Column', (['"""expires"""', 'DateTime'], {'nullable': '(False)'}), "('expires', DateTime, nullable=False)\n", (13471, 13508), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((13853, 13893), 'sqlalchemy.Column', 'Column', (['"""time"""', 'DateTime'], {'nullable': '(False)'}), "('time', DateTime, nullable=False)\n", (13859, 13893), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((14090, 14129), 'sqlalchemy.Column', 'Column', (['"""message"""', 'Text'], {'nullable': '(False)'}), "('message', Text, nullable=False)\n", (14096, 14129), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((14755, 14789), 'sqlalchemy.Column', 'Column', (['"""tag"""', 'Text'], {'nullable': '(True)'}), "('tag', Text, nullable=True)\n", (14761, 14789), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((14855, 14894), 'sqlalchemy.Column', 'Column', (['"""cpus"""', 'Integer'], {'nullable': '(False)'}), "('cpus', Integer, nullable=False)\n", (14861, 14894), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((14929, 14968), 'sqlalchemy.Column', 'Column', (['"""gpus"""', 'Integer'], {'nullable': '(False)'}), "('gpus', Integer, nullable=False)\n", (14935, 14968), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15003, 15053), 'sqlalchemy.Column', 'Column', (['"""memory_bytes"""', 'BigInteger'], {'nullable': '(False)'}), "('memory_bytes', BigInteger, nullable=False)\n", (15009, 15053), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15086, 15138), 'sqlalchemy.Column', 'Column', (['"""free_disk_bytes"""', 'BigInteger'], {'nullable': '(True)'}), "('free_disk_bytes', BigInteger, nullable=True)\n", (15092, 15138), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15179, 15227), 'sqlalchemy.Column', 'Column', (['"""checkin_time"""', 'DateTime'], {'nullable': '(False)'}), "('checkin_time', DateTime, nullable=False)\n", (15185, 15227), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15307, 15351), 'sqlalchemy.Column', 'Column', (['"""socket_id"""', 'Integer'], {'nullable': '(False)'}), "('socket_id', Integer, nullable=False)\n", (15313, 15351), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15402, 15455), 'sqlalchemy.Column', 'Column', (['"""shared_file_system"""', 'Boolean'], {'nullable': '(False)'}), "('shared_file_system', Boolean, nullable=False)\n", (15408, 15455), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15538, 15586), 'sqlalchemy.Column', 'Column', (['"""tag_exclusive"""', 'Boolean'], {'nullable': '(False)'}), "('tag_exclusive', Boolean, nullable=False)\n", (15544, 15586), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15669, 15723), 'sqlalchemy.Column', 'Column', (['"""exit_after_num_runs"""', 'Integer'], {'nullable': '(False)'}), "('exit_after_num_runs', Integer, nullable=False)\n", (15675, 15723), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15787, 15836), 'sqlalchemy.Column', 'Column', (['"""is_terminating"""', 'Boolean'], {'nullable': '(False)'}), "('is_terminating', Boolean, nullable=False)\n", (15793, 15836), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((16263, 16325), 'sqlalchemy.Column', 'Column', (['"""socket_id"""', 'Integer'], {'primary_key': '(True)', 'nullable': '(False)'}), "('socket_id', Integer, primary_key=True, nullable=False)\n", (16269, 16325), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((16594, 16684), 'sqlalchemy.sql.schema.ForeignKeyConstraint', 'ForeignKeyConstraint', (["['user_id', 'worker_id']", "['worker.user_id', 'worker.worker_id']"], {}), "(['user_id', 'worker_id'], ['worker.user_id',\n    'worker.worker_id'])\n", (16614, 16684), False, 'from sqlalchemy.sql.schema import ForeignKeyConstraint\n'), ((16765, 16796), 'sqlalchemy.Index', 'Index', (['"""uuid_index"""', '"""run_uuid"""'], {}), "('uuid_index', 'run_uuid')\n", (16770, 16796), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((17112, 17202), 'sqlalchemy.sql.schema.ForeignKeyConstraint', 'ForeignKeyConstraint', (["['user_id', 'worker_id']", "['worker.user_id', 'worker.worker_id']"], {}), "(['user_id', 'worker_id'], ['worker.user_id',\n    'worker.worker_id'])\n", (17132, 17202), False, 'from sqlalchemy.sql.schema import ForeignKeyConstraint\n'), ((17327, 17378), 'sqlalchemy.Column', 'Column', (['"""dependencies"""', 'LargeBinary'], {'nullable': '(False)'}), "('dependencies', LargeBinary, nullable=False)\n", (17333, 17378), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((947, 957), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (953, 957), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((1002, 1012), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (1008, 1012), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((1234, 1244), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (1240, 1244), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((1282, 1292), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (1288, 1292), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((1334, 1345), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (1340, 1345), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((1900, 1910), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (1906, 1910), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((1912, 1937), 'sqlalchemy.ForeignKey', 'ForeignKey', (['bundle.c.uuid'], {}), '(bundle.c.uuid)\n', (1922, 1937), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((1983, 1993), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (1989, 1993), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((2495, 2505), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (2501, 2505), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((2507, 2532), 'sqlalchemy.ForeignKey', 'ForeignKey', (['bundle.c.uuid'], {}), '(bundle.c.uuid)\n', (2517, 2532), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((2756, 2766), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (2762, 2766), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((3205, 3215), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (3211, 3215), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((3253, 3264), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (3259, 3264), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((3306, 3317), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (3312, 3317), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((3364, 3376), 'sqlalchemy.types.Unicode', 'Unicode', (['(255)'], {}), '(255)\n', (3371, 3376), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((4403, 4413), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (4409, 4413), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((4415, 4443), 'sqlalchemy.ForeignKey', 'ForeignKey', (['worksheet.c.uuid'], {}), '(worksheet.c.uuid)\n', (4425, 4443), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((4834, 4844), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (4840, 4844), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((4894, 4904), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (4900, 4904), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((5012, 5022), 'sqlalchemy.types.String', 'String', (['(20)'], {}), '(20)\n', (5018, 5022), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((5568, 5578), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (5574, 5578), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((5580, 5608), 'sqlalchemy.ForeignKey', 'ForeignKey', (['worksheet.c.uuid'], {}), '(worksheet.c.uuid)\n', (5590, 5608), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((5645, 5655), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (5651, 5655), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((6018, 6028), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (6024, 6028), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((6066, 6077), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (6072, 6077), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((6156, 6167), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (6162, 6167), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((6563, 6573), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (6569, 6573), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((6575, 6599), 'sqlalchemy.ForeignKey', 'ForeignKey', (['group.c.uuid'], {}), '(group.c.uuid)\n', (6585, 6599), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((6640, 6650), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (6646, 6650), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((6652, 6678), 'sqlalchemy.ForeignKey', 'ForeignKey', (['"""user.user_id"""'], {}), "('user.user_id')\n", (6662, 6678), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((7165, 7175), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (7171, 7175), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((7177, 7201), 'sqlalchemy.ForeignKey', 'ForeignKey', (['group.c.uuid'], {}), '(group.c.uuid)\n', (7187, 7201), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((7274, 7284), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (7280, 7284), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((7286, 7311), 'sqlalchemy.ForeignKey', 'ForeignKey', (['bundle.c.uuid'], {}), '(bundle.c.uuid)\n', (7296, 7311), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((7733, 7743), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (7739, 7743), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((7745, 7769), 'sqlalchemy.ForeignKey', 'ForeignKey', (['group.c.uuid'], {}), '(group.c.uuid)\n', (7755, 7769), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((7852, 7862), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (7858, 7862), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((7864, 7892), 'sqlalchemy.ForeignKey', 'ForeignKey', (['worksheet.c.uuid'], {}), '(worksheet.c.uuid)\n', (7874, 7892), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((8739, 8749), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (8745, 8749), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((8792, 8802), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (8798, 8802), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((8863, 8874), 'sqlalchemy.types.String', 'String', (['(254)'], {}), '(254)\n', (8869, 8874), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((9350, 9382), 'sqlalchemy.types.String', 'String', (['(30)'], {'convert_unicode': '(True)'}), '(30, convert_unicode=True)\n', (9356, 9382), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((9409, 9441), 'sqlalchemy.types.String', 'String', (['(30)'], {'convert_unicode': '(True)'}), '(30, convert_unicode=True)\n', (9415, 9441), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((9720, 9731), 'sqlalchemy.types.String', 'String', (['(128)'], {}), '(128)\n', (9726, 9731), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((9805, 9838), 'sqlalchemy.types.String', 'String', (['(255)'], {'convert_unicode': '(True)'}), '(255, convert_unicode=True)\n', (9811, 9838), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((9874, 9907), 'sqlalchemy.types.String', 'String', (['(255)'], {'convert_unicode': '(True)'}), '(255, convert_unicode=True)\n', (9880, 9907), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((10781, 10791), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (10787, 10791), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((10793, 10819), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (10803, 10819), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((10960, 10970), 'sqlalchemy.types.String', 'String', (['(64)'], {}), '(64)\n', (10966, 10970), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11274, 11284), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (11280, 11284), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11286, 11312), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (11296, 11312), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((11404, 11414), 'sqlalchemy.types.String', 'String', (['(64)'], {}), '(64)\n', (11410, 11414), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11703, 11713), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (11709, 11713), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11751, 11761), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (11757, 11761), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11800, 11811), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (11806, 11811), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11851, 11861), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (11857, 11861), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11863, 11889), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (11873, 11889), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((11949, 12026), 'sqlalchemy.types.Enum', 'Enum', (['"""authorization_code"""', '"""password"""', '"""client_credentials"""', '"""refresh_token"""'], {}), "('authorization_code', 'password', 'client_credentials', 'refresh_token')\n", (11953, 12026), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((12087, 12108), 'sqlalchemy.types.Enum', 'Enum', (['"""code"""', '"""token"""'], {}), "('code', 'token')\n", (12091, 12108), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((12613, 12623), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (12619, 12623), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((12625, 12662), 'sqlalchemy.ForeignKey', 'ForeignKey', (['oauth2_client.c.client_id'], {}), '(oauth2_client.c.client_id)\n', (12635, 12662), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((12703, 12713), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (12709, 12713), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((12715, 12741), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (12725, 12741), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((12831, 12842), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (12837, 12842), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((12886, 12897), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (12892, 12897), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((13221, 13231), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (13227, 13231), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((13233, 13270), 'sqlalchemy.ForeignKey', 'ForeignKey', (['oauth2_client.c.client_id'], {}), '(oauth2_client.c.client_id)\n', (13243, 13270), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((13311, 13321), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (13317, 13321), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((13323, 13349), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (13333, 13349), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((13431, 13442), 'sqlalchemy.types.String', 'String', (['(100)'], {}), '(100)\n', (13437, 13442), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((13537, 13548), 'sqlalchemy.types.String', 'String', (['(255)'], {}), '(255)\n', (13543, 13548), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((13962, 13972), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (13968, 13972), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((14038, 14048), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (14044, 14048), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((14204, 14214), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (14210, 14214), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((14330, 14340), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (14336, 14340), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((14525, 14535), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (14531, 14535), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((14537, 14563), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (14547, 14563), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((14624, 14635), 'sqlalchemy.types.String', 'String', (['(127)'], {}), '(127)\n', (14630, 14635), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((14697, 14707), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (14703, 14707), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((14709, 14733), 'sqlalchemy.ForeignKey', 'ForeignKey', (['group.c.uuid'], {}), '(group.c.uuid)\n', (14719, 14733), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((15998, 16008), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (16004, 16008), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((16010, 16036), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (16020, 16036), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((16079, 16090), 'sqlalchemy.types.String', 'String', (['(127)'], {}), '(127)\n', (16085, 16090), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((16479, 16489), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (16485, 16489), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((16491, 16517), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (16501, 16517), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((16560, 16571), 'sqlalchemy.types.String', 'String', (['(127)'], {}), '(127)\n', (16566, 16571), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((16705, 16715), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (16711, 16715), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((16717, 16742), 'sqlalchemy.ForeignKey', 'ForeignKey', (['bundle.c.uuid'], {}), '(bundle.c.uuid)\n', (16727, 16742), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((16961, 16971), 'sqlalchemy.types.String', 'String', (['(63)'], {}), '(63)\n', (16967, 16971), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((16973, 16999), 'sqlalchemy.ForeignKey', 'ForeignKey', (['user.c.user_id'], {}), '(user.c.user_id)\n', (16983, 16999), False, 'from sqlalchemy import Column, ForeignKey, Index, MetaData, Table, UniqueConstraint\n'), ((17060, 17071), 'sqlalchemy.types.String', 'String', (['(127)'], {}), '(127)\n', (17066, 17071), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((797, 809), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (807, 809), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((1743, 1755), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (1753, 1755), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((2339, 2351), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (2349, 2351), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((3055, 3067), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (3065, 3067), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((4243, 4255), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (4253, 4255), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((5408, 5420), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (5418, 5420), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((5868, 5880), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (5878, 5880), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((6407, 6419), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (6417, 6419), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((7009, 7021), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (7019, 7021), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((7577, 7589), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (7587, 7589), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((8562, 8574), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (8572, 8574), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((10628, 10640), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (10638, 10640), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11121, 11133), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (11131, 11133), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((11548, 11560), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (11558, 11560), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((12458, 12470), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (12468, 12470), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((13066, 13078), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (13076, 13078), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n'), ((13703, 13715), 'sqlalchemy.types.BigInteger', 'BigInteger', ([], {}), '()\n', (13713, 13715), False, 'from sqlalchemy.types import BigInteger, Boolean, DateTime, Enum, Float, Integer, LargeBinary, String, Text, Unicode\n')]