Warning
This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
Source code for galaxy.model.migrate.versions.0070_add_info_column_to_deferred_job_table
"""
Migration script to add 'info' column to the transfer_job table.
"""
from __future__ import print_function
import logging
from sqlalchemy import Column, MetaData, Table, TEXT
log = logging.getLogger(__name__)
metadata = MetaData()
[docs]def upgrade(migrate_engine):
metadata.bind = migrate_engine
print(__doc__)
metadata.reflect()
try:
TransferJob_table = Table("transfer_job", metadata, autoload=True)
c = Column("info", TEXT)
c.create(TransferJob_table)
assert c is TransferJob_table.c.info
except Exception:
log.exception("Adding info column to transfer_job table failed.")
[docs]def downgrade(migrate_engine):
metadata.bind = migrate_engine
metadata.reflect()
try:
TransferJob_table = Table("transfer_job", metadata, autoload=True)
TransferJob_table.c.info.drop()
except Exception:
log.exception("Dropping info column from transfer_job table failed.")