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.0055_add_pja_assoc_for_jobs
"""
Migration script to add the post_job_action_association table.
"""
from __future__ import print_function
import logging
from sqlalchemy import Column, ForeignKey, Integer, MetaData, Table
from galaxy.model.migrate.versions.util import create_table, drop_table
log = logging.getLogger(__name__)
metadata = MetaData()
PostJobActionAssociation_table = Table("post_job_action_association", metadata,
Column("id", Integer, primary_key=True),
Column("post_job_action_id", Integer, ForeignKey("post_job_action.id"), index=True, nullable=False),
Column("job_id", Integer, ForeignKey("job.id"), index=True, nullable=False))
[docs]def upgrade(migrate_engine):
print(__doc__)
metadata.bind = migrate_engine
metadata.reflect()
create_table(PostJobActionAssociation_table)
[docs]def downgrade(migrate_engine):
metadata.bind = migrate_engine
metadata.reflect()
drop_table(PostJobActionAssociation_table)