Warning

This document is for an old release 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.0028_external_metadata_file_override

"""
This script adds the filename_override_metadata column to the JobExternalOutputMetadata table,
allowing existing metadata files to be written when using external metadata and a cluster
set up with read-only access to database/files
"""
from __future__ import print_function

import logging

from sqlalchemy import (
    Column,
    MetaData,
    String,
)

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("filename_override_metadata", String(255)) add_column(col, 'job_external_output_metadata', metadata)
[docs]def downgrade(migrate_engine): metadata.bind = migrate_engine metadata.reflect() drop_column('filename_override_metadata', 'job_external_output_metadata', metadata)