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.0125_workflow_step_tracking

"""
Migration script to enhance workflow step usability by adding labels and UUIDs.
"""
from __future__ import print_function

import logging

from sqlalchemy import Column, MetaData

from galaxy.model.custom_types import TrimmedString, UUIDType
from galaxy.model.migrate.versions.util import add_column, drop_column

log = logging.getLogger(__name__)
metadata = MetaData()


[docs]def upgrade(migrate_engine): metadata.bind = migrate_engine print(__doc__) metadata.reflect() StepLabel_column = Column("label", TrimmedString(255)) StepUUID_column = Column("uuid", UUIDType, nullable=True) add_column(StepLabel_column, "workflow_step", metadata) add_column(StepUUID_column, "workflow_step", metadata)
[docs]def downgrade(migrate_engine): metadata.bind = migrate_engine metadata.reflect() drop_column("label", "workflow_step", metadata) drop_column("uuid", "workflow_step", metadata)