Skip to content

Commit

Permalink
Python 3: remaining model migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ericenns committed Jun 26, 2016
1 parent 005429a commit 9ad9c0c
Show file tree
Hide file tree
Showing 107 changed files with 442 additions and 336 deletions.
106 changes: 106 additions & 0 deletions .ci/py3_sources.txt
Expand Up @@ -50,6 +50,112 @@ lib/galaxy/model/migrate/versions/0020_library_upload_job.py
lib/galaxy/model/migrate/versions/0021_user_prefs.py
lib/galaxy/model/migrate/versions/0022_visualization_tables.py
lib/galaxy/model/migrate/versions/0023_page_published_and_deleted_columns.py
lib/galaxy/model/migrate/versions/0024_page_slug_unique_constraint.py
lib/galaxy/model/migrate/versions/0025_user_info.py
lib/galaxy/model/migrate/versions/0026_cloud_tables.py
lib/galaxy/model/migrate/versions/0027_request_events.py
lib/galaxy/model/migrate/versions/0028_external_metadata_file_override.py
lib/galaxy/model/migrate/versions/0029_user_actions.py
lib/galaxy/model/migrate/versions/0030_history_slug_column.py
lib/galaxy/model/migrate/versions/0031_community_and_workflow_tags.py
lib/galaxy/model/migrate/versions/0032_stored_workflow_slug_column.py
lib/galaxy/model/migrate/versions/0033_published_cols_for_histories_and_workflows.py
lib/galaxy/model/migrate/versions/0034_page_user_share_association.py
lib/galaxy/model/migrate/versions/0035_item_annotations_and_workflow_step_tags.py
lib/galaxy/model/migrate/versions/0036_add_deleted_column_to_library_template_assoc_tables.py
lib/galaxy/model/migrate/versions/0037_samples_library.py
lib/galaxy/model/migrate/versions/0038_add_inheritable_column_to_library_template_assoc_tables.py
lib/galaxy/model/migrate/versions/0039_add_synopsis_column_to_library_table.py
lib/galaxy/model/migrate/versions/0040_page_annotations.py
lib/galaxy/model/migrate/versions/0041_workflow_invocation.py
lib/galaxy/model/migrate/versions/0042_workflow_invocation_fix.py
lib/galaxy/model/migrate/versions/0043_visualization_sharing_tagging_annotating.py
lib/galaxy/model/migrate/versions/0044_add_notify_column_to_request_table.py
lib/galaxy/model/migrate/versions/0045_request_type_permissions_table.py
lib/galaxy/model/migrate/versions/0046_post_job_actions.py
lib/galaxy/model/migrate/versions/0047_job_table_user_id_column.py
lib/galaxy/model/migrate/versions/0048_dataset_instance_state_column.py
lib/galaxy/model/migrate/versions/0049_api_keys_table.py
lib/galaxy/model/migrate/versions/0050_drop_cloud_tables.py
lib/galaxy/model/migrate/versions/0051_imported_col_for_jobs_table.py
lib/galaxy/model/migrate/versions/0052_sample_dataset_table.py
lib/galaxy/model/migrate/versions/0053_item_ratings.py
lib/galaxy/model/migrate/versions/0054_visualization_dbkey.py
lib/galaxy/model/migrate/versions/0055_add_pja_assoc_for_jobs.py
lib/galaxy/model/migrate/versions/0056_workflow_outputs.py
lib/galaxy/model/migrate/versions/0057_request_notify.py
lib/galaxy/model/migrate/versions/0058_history_import_export.py
lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py
lib/galaxy/model/migrate/versions/0060_history_archive_import.py
lib/galaxy/model/migrate/versions/0061_tasks.py
lib/galaxy/model/migrate/versions/0062_user_openid_table.py
lib/galaxy/model/migrate/versions/0063_sequencer_table.py
lib/galaxy/model/migrate/versions/0064_add_run_and_sample_run_association_tables.py
lib/galaxy/model/migrate/versions/0065_add_name_to_form_fields_and_values.py
lib/galaxy/model/migrate/versions/0066_deferred_job_and_transfer_job_tables.py
lib/galaxy/model/migrate/versions/0067_populate_sequencer_table.py
lib/galaxy/model/migrate/versions/0068_rename_sequencer_to_external_services.py
lib/galaxy/model/migrate/versions/0069_rename_sequencer_form_type.py
lib/galaxy/model/migrate/versions/0070_add_info_column_to_deferred_job_table.py
lib/galaxy/model/migrate/versions/0071_add_history_and_workflow_to_sample.py
lib/galaxy/model/migrate/versions/0072_add_pid_and_socket_columns_to_transfer_job_table.py
lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py
lib/galaxy/model/migrate/versions/0074_add_purged_column_to_library_dataset_table.py
lib/galaxy/model/migrate/versions/0075_add_subindex_column_to_run_table.py
lib/galaxy/model/migrate/versions/0076_fix_form_values_data_corruption.py
lib/galaxy/model/migrate/versions/0077_create_tool_tag_association_table.py
lib/galaxy/model/migrate/versions/0078_add_columns_for_disk_usage_accounting.py
lib/galaxy/model/migrate/versions/0079_input_library_to_job_table.py
lib/galaxy/model/migrate/versions/0080_quota_tables.py
lib/galaxy/model/migrate/versions/0081_add_tool_version_to_hda_ldda.py
lib/galaxy/model/migrate/versions/0082_add_tool_shed_repository_table.py
lib/galaxy/model/migrate/versions/0083_add_prepare_files_to_task.py
lib/galaxy/model/migrate/versions/0084_add_ldda_id_to_implicit_conversion_table.py
lib/galaxy/model/migrate/versions/0085_add_task_info.py
lib/galaxy/model/migrate/versions/0086_add_tool_shed_repository_table_columns.py
lib/galaxy/model/migrate/versions/0087_tool_id_guid_map_table.py
lib/galaxy/model/migrate/versions/0088_add_installed_changeset_revison_column.py
lib/galaxy/model/migrate/versions/0089_add_object_store_id_columns.py
lib/galaxy/model/migrate/versions/0090_add_tool_shed_repository_table_columns.py
lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py
lib/galaxy/model/migrate/versions/0092_add_migrate_tools_table.py
lib/galaxy/model/migrate/versions/0093_add_job_params_col.py
lib/galaxy/model/migrate/versions/0094_add_job_handler_col.py
lib/galaxy/model/migrate/versions/0095_hda_subsets.py
lib/galaxy/model/migrate/versions/0096_openid_provider.py
lib/galaxy/model/migrate/versions/0097_add_ctx_rev_column.py
lib/galaxy/model/migrate/versions/0098_genome_index_tool_data_table.py
lib/galaxy/model/migrate/versions/0099_add_tool_dependency_table.py
lib/galaxy/model/migrate/versions/0100_alter_tool_dependency_table_version_column.py
lib/galaxy/model/migrate/versions/0101_drop_installed_changeset_revision_column.py
lib/galaxy/model/migrate/versions/0102_add_tool_dependency_status_columns.py
lib/galaxy/model/migrate/versions/0103_add_tool_shed_repository_status_columns.py
lib/galaxy/model/migrate/versions/0105_add_cleanup_event_table.py
lib/galaxy/model/migrate/versions/0106_add_missing_indexes.py
lib/galaxy/model/migrate/versions/0107_add_exit_code_to_job_and_task.py
lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py
lib/galaxy/model/migrate/versions/0109_add_repository_dependency_tables.py
lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py
lib/galaxy/model/migrate/versions/0111_add_job_destinations.py
lib/galaxy/model/migrate/versions/0112_add_data_manager_history_association_and_data_manager_job_association_tables.py
lib/galaxy/model/migrate/versions/0113_update_migrate_tools_table.py
lib/galaxy/model/migrate/versions/0114_update_migrate_tools_table_again.py
lib/galaxy/model/migrate/versions/0116_drop_update_available_col_add_tool_shed_status_col.py
lib/galaxy/model/migrate/versions/0117_add_user_activation.py
lib/galaxy/model/migrate/versions/0118_add_hda_extended_metadata.py
lib/galaxy/model/migrate/versions/0119_job_metrics.py
lib/galaxy/model/migrate/versions/0120_dataset_collections.py
lib/galaxy/model/migrate/versions/0121_workflow_uuids.py
lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py
lib/galaxy/model/migrate/versions/0123_add_workflow_request_tables.py
lib/galaxy/model/migrate/versions/0124_job_state_history.py
lib/galaxy/model/migrate/versions/0125_workflow_step_tracking.py
lib/galaxy/model/migrate/versions/0126_password_reset.py
lib/galaxy/model/migrate/versions/0127_output_collection_adjustments.py
lib/galaxy/model/migrate/versions/0128_session_timeout.py
lib/galaxy/model/migrate/versions/0129_job_external_output_metadata_validity.py
lib/galaxy/model/migrate/versions/0130_change_pref_datatype.py
lib/galaxy/model/migrate/versions/0131_subworkflow_and_input_parameter_modules.py
lib/galaxy/objectstore/
lib/galaxy/openid/
lib/galaxy/quota/
Expand Down
Expand Up @@ -14,7 +14,7 @@

def upgrade(migrate_engine):
metadata.bind = migrate_engine
print __doc__
print(__doc__)
metadata.reflect()

Page_table = Table( "page", metadata, autoload=True )
Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/model/migrate/versions/0025_user_info.py
Expand Up @@ -22,9 +22,9 @@


def display_migration_details():
print "========================================"
print "This script adds a foreign key to the form_values table in the galaxy_user table"
print "========================================"
print("========================================")
print("This script adds a foreign key to the form_values table in the galaxy_user table")
print("========================================")


def upgrade(migrate_engine):
Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/model/migrate/versions/0026_cloud_tables.py
Expand Up @@ -10,9 +10,9 @@

def display_migration_details():
print
print "========================================"
print "This script adds tables needed for Galaxy cloud functionality."
print "========================================"
print("========================================")
print("This script adds tables needed for Galaxy cloud functionality.")
print("========================================")

CloudImage_table = Table( "cloud_image", metadata,
Column( "id", Integer, primary_key=True ),
Expand Down
8 changes: 4 additions & 4 deletions lib/galaxy/model/migrate/versions/0027_request_events.py
Expand Up @@ -24,10 +24,10 @@


def display_migration_details():
print "========================================"
print "This migration script adds the request_event table and"
print "removes the state field in the request table"
print "========================================"
print("========================================")
print("This migration script adds the request_event table and")
print("removes the state field in the request table")
print("========================================")


RequestEvent_table = Table('request_event', metadata,
Expand Down
Expand Up @@ -22,11 +22,11 @@


def display_migration_details():
print "========================================"
print "This script adds the filename_override_metadata column to the JobExternalOutputMetadata table,"
print" allowing existing metadata files to be written when using external metadata and a cluster"
print "set up with read-only access to database/files"
print "========================================"
print("========================================")
print("This script adds the filename_override_metadata column to the JobExternalOutputMetadata table,")
print(" allowing existing metadata files to be written when using external metadata and a cluster")
print("set up with read-only access to database/files")
print("========================================")


def upgrade(migrate_engine):
Expand Down
10 changes: 5 additions & 5 deletions lib/galaxy/model/migrate/versions/0029_user_actions.py
Expand Up @@ -12,9 +12,9 @@


def display_migration_details():
print ""
print "This migration script adds a user actions table to Galaxy."
print ""
print("")
print("This migration script adds a user actions table to Galaxy.")
print("")


# New table to store user actions.
Expand All @@ -35,7 +35,7 @@ def upgrade(migrate_engine):
try:
UserAction_table.create()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Creating user_action table failed: %s" % str( e ) )


Expand All @@ -45,5 +45,5 @@ def downgrade(migrate_engine):
try:
UserAction_table.drop()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Dropping user_action table failed: %s" % str( e ) )
Expand Up @@ -12,7 +12,7 @@
def upgrade(migrate_engine):
metadata.bind = migrate_engine

print __doc__
print(__doc__)
metadata.reflect()

History_table = Table( "history", metadata, autoload=True )
Expand Down
Expand Up @@ -33,7 +33,7 @@

def upgrade(migrate_engine):
metadata.bind = migrate_engine
print __doc__
print(__doc__)
metadata.reflect()

# Create user_id column in history_tag_association table.
Expand All @@ -45,7 +45,7 @@ def upgrade(migrate_engine):
assert c is HistoryTagAssociation_table.c.user_id
except Exception as e:
# SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises.
print str(e)
print(str(e))
log.debug( "Adding user_id column to history_tag_association table failed: %s" % str( e ) )
else:
c = Column( "user_id", Integer)
Expand All @@ -54,7 +54,7 @@ def upgrade(migrate_engine):
assert c is HistoryTagAssociation_table.c.user_id
except Exception as e:
# SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises.
print str(e)
print(str(e))
log.debug( "Adding user_id column to history_tag_association table failed: %s" % str( e ) )

# Populate column so that user_id is the id of the user who owns the history (and, up to now, was the only person able to tag the history).
Expand All @@ -71,7 +71,7 @@ def upgrade(migrate_engine):
assert c is HistoryDatasetAssociationTagAssociation_table.c.user_id
except Exception as e:
# SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises.
print str(e)
print(str(e))
log.debug( "Adding user_id column to history_dataset_association_tag_association table failed: %s" % str( e ) )
else:
# In sqlite, we can no longer quietly fail to add foreign key.
Expand All @@ -83,7 +83,7 @@ def upgrade(migrate_engine):
assert c is HistoryDatasetAssociationTagAssociation_table.c.user_id
except Exception as e:
# SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises.
print str(e)
print(str(e))
log.debug( "Adding user_id column to history_dataset_association_tag_association table failed: %s" % str( e ) )

# Populate column so that user_id is the id of the user who owns the history_dataset_association (and, up to now, was the only person able to tag the page).
Expand All @@ -99,7 +99,7 @@ def upgrade(migrate_engine):
assert c is PageTagAssociation_table.c.user_id
except Exception as e:
# SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises.
print str(e)
print(str(e))
log.debug( "Adding user_id column to page_tag_association table failed: %s" % str( e ) )
else:
# Create user_id column in page_tag_association table.
Expand All @@ -110,7 +110,7 @@ def upgrade(migrate_engine):
assert c is PageTagAssociation_table.c.user_id
except Exception as e:
# SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises.
print str(e)
print(str(e))
log.debug( "Adding user_id column to page_tag_association table failed: %s" % str( e ) )

# Populate column so that user_id is the id of the user who owns the page (and, up to now, was the only person able to tag the page).
Expand All @@ -122,14 +122,14 @@ def upgrade(migrate_engine):
try:
StoredWorkflowTagAssociation_table.create()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Creating stored_workflow_tag_association table failed: %s" % str( e ) )

# Create workflow_tag_association table.
try:
WorkflowTagAssociation_table.create()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Creating workflow_tag_association table failed: %s" % str( e ) )


Expand All @@ -142,35 +142,35 @@ def downgrade(migrate_engine):
try:
HistoryTagAssociation_table.c.user_id.drop()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Dropping column user_id from history_tag_association table failed: %s" % str( e ) )

# Drop user_id column from history_dataset_association_tag_association table.
HistoryDatasetAssociationTagAssociation_table = Table( "history_dataset_association_tag_association", metadata, autoload=True )
try:
HistoryDatasetAssociationTagAssociation_table.c.user_id.drop()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Dropping column user_id from history_dataset_association_tag_association table failed: %s" % str( e ) )

# Drop user_id column from page_tag_association table.
PageTagAssociation_table = Table( "page_tag_association", metadata, autoload=True )
try:
PageTagAssociation_table.c.user_id.drop()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Dropping column user_id from page_tag_association table failed: %s" % str( e ) )

# Drop stored_workflow_tag_association table.
try:
StoredWorkflowTagAssociation_table.drop()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Dropping stored_workflow_tag_association table failed: %s" % str( e ) )

# Drop workflow_tag_association table.
try:
WorkflowTagAssociation_table.drop()
except Exception as e:
print str(e)
print(str(e))
log.debug( "Dropping workflow_tag_association table failed: %s" % str( e ) )
Expand Up @@ -12,7 +12,7 @@
def upgrade(migrate_engine):
metadata.bind = migrate_engine

print __doc__
print(__doc__)
metadata.reflect()

StoredWorkflow_table = Table( "stored_workflow", metadata, autoload=True )
Expand Down

0 comments on commit 9ad9c0c

Please sign in to comment.