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.0097_add_ctx_rev_column
"""
Migration script to add the ctx_rev column to the tool_shed_repository table.
"""
import logging
from sqlalchemy import (
Column,
MetaData
)
from galaxy.model.custom_types import TrimmedString
from galaxy.model.migrate.versions.util import (
add_column,
drop_column
)
log = logging.getLogger(__name__)
metadata = MetaData()
[docs]def upgrade(migrate_engine):
print(__doc__)
metadata.bind = migrate_engine
metadata.reflect()
col = Column("ctx_rev", TrimmedString(10))
add_column(col, 'tool_shed_repository', metadata)
[docs]def downgrade(migrate_engine):
metadata.bind = migrate_engine
metadata.reflect()
drop_column('ctx_rev', 'tool_shed_repository', metadata)