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.0152_add_metadata_file_uuid

"""
Adds `uuid` column to MetadataFile table.
"""

from __future__ import print_function

import logging

from sqlalchemy import (
    Column,
    MetaData
)

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

log = logging.getLogger(__name__)


[docs]def upgrade(migrate_engine): print(__doc__) metadata = MetaData() metadata.bind = migrate_engine metadata.reflect() uuid_column = Column('uuid', UUIDType()) add_column(uuid_column, 'metadata_file', metadata)
[docs]def downgrade(migrate_engine): metadata = MetaData() metadata.bind = migrate_engine metadata.reflect() drop_column('uuid', 'metadata_file', metadata)