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.0134_hda_set_deleted_if_purged
"""
Migration script to set the 'deleted' column of the
'history_dataset_association' table to True if 'purged' is True.
"""
from __future__ import print_function
import logging
from galaxy.model.migrate.versions.util import engine_true
log = logging.getLogger(__name__)
[docs]def upgrade(migrate_engine):
print(__doc__)
cmd = 'UPDATE history_dataset_association SET deleted=%s WHERE purged;' % engine_true(migrate_engine)
try:
migrate_engine.execute(cmd)
except Exception:
log.exception("Exception executing SQL command: %s", cmd)