commit/galaxy-central: natefoo: It turns out that our old version of SQLAlchemy already has the Postgres/MySQL BIGINT types, it just needed the BigInteger SQLAlchemy type and SQLite BIGINT. And fix a bug found by Jack Zhu.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/62d51750d7df/ changeset: 62d51750d7df user: natefoo date: 2011-08-29 15:32:26 summary: It turns out that our old version of SQLAlchemy already has the Postgres/MySQL BIGINT types, it just needed the BigInteger SQLAlchemy type and SQLite BIGINT. And fix a bug found by Jack Zhu. affected #: 1 file (946 bytes) --- a/lib/galaxy/model/custom_types.py Sun Aug 28 14:07:33 2011 -0400 +++ b/lib/galaxy/model/custom_types.py Mon Aug 29 09:32:26 2011 -0400 @@ -105,40 +105,12 @@ class BIGINT( BigInteger ): """The SQL BIGINT type.""" -class DBBigInteger( BigInteger ): +class SLBigInteger( BigInteger ): def get_col_spec( self ): return "BIGINT" -sqlalchemy.databases.postgres.PGBigInteger = DBBigInteger -sqlalchemy.databases.postgres.colspecs[BigInteger] = DBBigInteger -sqlalchemy.databases.sqlite.SLBigInteger = DBBigInteger -sqlalchemy.databases.sqlite.colspecs[BigInteger] = DBBigInteger - -class MSBigInteger( BigInteger, sqlalchemy.databases.mysql.MSInteger ): - """MySQL BIGINTEGER type.""" - - def __init__(self, display_width=None, **kw): - """Construct a BIGINTEGER. - - :param display_width: Optional, maximum display width for this number. - - :param unsigned: a boolean, optional. - - :param zerofill: Optional. If true, values will be stored as strings - left-padded with zeros. Note that this does not effect the values - returned by the underlying database API, which continue to be - numeric. - - """ - self.display_width = display_width - sqlalchemy.databases.mysql._NumericType.__init__(self, kw) - BigInteger.__init__(self, **kw) - - def get_col_spec(self): - if self.display_width is not None: - return self._extend("BIGINT(%(display_width)s)" % {'display_width': self.display_width}) - else: - return self._extend("BIGINT") - -sqlalchemy.databases.mysql.MSBigInteger = MSBigInteger -sqlalchemy.databases.mysql.colspecs[BigInteger] = MSBigInteger +sqlalchemy.databases.sqlite.SLBigInteger = SLBigInteger +sqlalchemy.databases.sqlite.colspecs[BigInteger] = SLBigInteger +sqlalchemy.databases.sqlite.ischema_names['BIGINT'] = SLBigInteger +sqlalchemy.databases.postgres.colspecs[BigInteger] = sqlalchemy.databases.postgres.PGBigInteger +sqlalchemy.databases.mysql.colspecs[BigInteger] = sqlalchemy.databases.mysql.MSBigInteger 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.
participants (1)
-
Bitbucket