1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/77676b985228/ Changeset: 77676b985228 User: dannon Date: 2014-11-13 17:18:32+00:00 Summary: Merged in jmchilton/galaxy-central-fork-1 (pull request #558) Make JSONType columns bigger in MySQL Affected #: 2 files diff -r 7f247bf156dfc7cfa7f764cf9757ae3839f0b72c -r 77676b9852282c0a240ebebb410374b233a1fa36 lib/galaxy/model/custom_types.py --- a/lib/galaxy/model/custom_types.py +++ b/lib/galaxy/model/custom_types.py @@ -65,6 +65,13 @@ def is_mutable( self ): return True + def load_dialect_impl(self, dialect): + if dialect.name == "mysql": + return dialect.type_descriptor(sqlalchemy.dialects.mysql.MEDIUMBLOB) + else: + return self.impl + + metadata_pickler = AliasPickleModule( { ( "cookbook.patterns", "Bunch" ) : ( "galaxy.util.bunch" , "Bunch" ) } ) diff -r 7f247bf156dfc7cfa7f764cf9757ae3839f0b72c -r 77676b9852282c0a240ebebb410374b233a1fa36 lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py --- /dev/null +++ b/lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py @@ -0,0 +1,58 @@ +""" +Migration script to grow MySQL blobs. +""" + +from sqlalchemy import MetaData + +import datetime +now = datetime.datetime.utcnow + +import logging +log = logging.getLogger( __name__ ) + +metadata = MetaData() + +BLOB_COLUMNS = [ + ("deferred_job", "params"), + ("extended_metadata", "data"), + ("form_definition", "fields"), + ("form_definition", "layout"), + ("form_values", "content"), + ("history_dataset_association", "metadata"), + ("job", "destination_params"), + ("library_dataset_dataset_association", "metadata"), + ("post_job_action", "action_arguments"), + ("request", "notification"), + ("sample", "workflow"), + ("transfer_job", "params"), + ("workflow_step", "tool_inputs"), + ("workflow_step", "tool_errors"), + ("workflow_step", "position"), + ("workflow_step", "config"), + ("tool_shed_repository", "metadata"), + ("tool_shed_repository", "tool_shed_status"), +] + + +def upgrade(migrate_engine): + metadata.bind = migrate_engine + print __doc__ + metadata.reflect() + + if migrate_engine.name != "mysql": + return + + for (table, column) in BLOB_COLUMNS: + cmd = "ALTER TABLE %s MODIFY COLUMN %s MEDIUMBLOB;" % (table, column) + try: + migrate_engine.execute( cmd ) + except Exception as e: + print "Failed to grow column %s.%s" % (table, column) + print str( e ) + + +def downgrade(migrate_engine): + metadata.bind = migrate_engine + metadata.reflect() + # Ignoring..., changed the datatype so no guarantee these columns weren't + # MEDIUMBLOBs before. Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.