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.0166_job_state_summary_view

Job state trigger syncs update_time in hdca table.
Add job-state-summary view for hdca elements

import logging

from galaxy.model.view import HistoryDatasetCollectionJobStateSummary
from galaxy.model.view.utils import CreateView, DropView

log = logging.getLogger(__name__)

[docs]def upgrade(migrate_engine): print(__doc__) # drop first because sqlite does not support or_replace downgrade(migrate_engine) view = HistoryDatasetCollectionJobStateSummary create_view = CreateView(view.name, view.__view__) # print(str(create_view.compile(migrate_engine))) migrate_engine.execute(create_view)
[docs]def downgrade(migrate_engine): drop_view = DropView(HistoryDatasetCollectionJobStateSummary.name) # print(str(drop_view.compile(migrate_engine))) migrate_engine.execute(drop_view)