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.0159_add_job_external_id_index

Add index for job runner external ID.

import logging

from sqlalchemy import MetaData

from galaxy.model.migrate.versions.util import (

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

[docs]def upgrade(migrate_engine): print(__doc__) metadata.bind = migrate_engine metadata.reflect() add_index('ix_job_job_runner_external_id', 'job', 'job_runner_external_id', metadata)
[docs]def downgrade(migrate_engine): metadata.bind = migrate_engine metadata.reflect() drop_index('ix_job_job_runner_external_id', 'job', 'job_runner_external_id', metadata)