1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/0ecb4c8f7cc6/ changeset: 0ecb4c8f7cc6 user: natefoo date: 2011-06-14 19:41:58 summary: Add a "disk_usage" column to galaxy_session. affected #: 3 files (930 bytes) --- a/lib/galaxy/jobs/__init__.py Tue Jun 14 13:22:12 2011 -0400 +++ b/lib/galaxy/jobs/__init__.py Tue Jun 14 13:41:58 2011 -0400 @@ -424,6 +424,7 @@ dataset.blurb = 'tool error' dataset.info = message dataset.set_size() + dataset.dataset.set_total_size() if dataset.ext == 'auto': dataset.extension = 'data' self.sa_session.add( dataset ) --- a/lib/galaxy/model/mapping.py Tue Jun 14 13:22:12 2011 -0400 +++ b/lib/galaxy/model/mapping.py Tue Jun 14 13:41:58 2011 -0400 @@ -475,8 +475,8 @@ Column( "current_history_id", Integer, ForeignKey( "history.id" ), nullable=True ), Column( "session_key", TrimmedString( 255 ), index=True, unique=True ), # unique 128 bit random number coerced to a string Column( "is_valid", Boolean, default=False ), - Column( "prev_session_id", Integer ) # saves a reference to the previous session so we have a way to chain them together - ) + Column( "prev_session_id", Integer ), # saves a reference to the previous session so we have a way to chain them together + Column( "disk_usage", Numeric( 15, 0 ), index=True ) ) GalaxySessionToHistoryAssociation.table = Table( "galaxy_session_to_history", metadata, Column( "id", Integer, primary_key=True ), --- a/lib/galaxy/model/migrate/versions/0078_add_columns_for_disk_usage_accounting.py Tue Jun 14 13:22:12 2011 -0400 +++ b/lib/galaxy/model/migrate/versions/0078_add_columns_for_disk_usage_accounting.py Tue Jun 14 13:41:58 2011 -0400 @@ -1,6 +1,7 @@ """ Migration script to add 'total_size' column to the dataset table, 'purged' -column to the HDA table, and 'disk_usage' column to the User table. +column to the HDA table, and 'disk_usage' column to the User and GalaxySession +tables. """ from sqlalchemy import * @@ -45,6 +46,15 @@ print "Adding disk_usage column to galaxy_user table failed: %s" % str( e ) log.debug( "Adding disk_usage column to galaxy_user table failed: %s" % str( e ) ) + try: + GalaxySession_table = Table( "galaxy_session", metadata, autoload=True ) + c = Column( 'disk_usage', Numeric( 15, 0 ), index=True ) + c.create( GalaxySession_table ) + assert c is GalaxySession_table.c.disk_usage + except Exception, e: + print "Adding disk_usage column to galaxy_session table failed: %s" % str( e ) + log.debug( "Adding disk_usage column to galaxy_session table failed: %s" % str( e ) ) + def downgrade(): metadata.reflect() try: @@ -67,3 +77,10 @@ except Exception, e: print "Dropping disk_usage column from galaxy_user table failed: %s" % str( e ) log.debug( "Dropping disk_usage column from galaxy_user table failed: %s" % str( e ) ) + + try: + GalaxySession_table = Table( "galaxy_session", metadata, autoload=True ) + GalaxySession_table.c.disk_usage.drop() + except Exception, e: + print "Dropping disk_usage column from galaxy_session table failed: %s" % str( e ) + log.debug( "Dropping disk_usage column from galaxy_session table failed: %s" % str( e ) ) 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.