Make sqlite handle BIGINT

Issue #2764 resolved
Former user created an issue

Consider this example:

Python 2.7.3 (default, Jan  2 2013, 13:56:14) 
[4.7.2](GCC) on linux2
Type "help", "copyright", "credits" or "license" for more information.
Debug helper loaded.  Type "print(D.__doc__)" for help.
>>> import sqlalchemy as s
>>> c = s.create_engine("sqlite:///:memory:")
>>> c = s.create_engine("sqlite:///:memory:").connect()
>>> m = s.MetaData(bind=c)
>>> x = s.Table("x", m, s.Column("x", s.types.BIGINT, nullable=False))
>>> x.create()
>>> m1 = s.MetaData(bind=c)
>>> xx = s.Table('x', m1, autoload=True)
/usr/lib/python2.7/dist-packages/sqlalchemy/engine/reflection.py:47: SAWarning: Did not recognize type 'BIGINT' of column 'x'
  ret = fn(self, con, *args, **kw)
>>>

Sqlalchemy should be able to parse the metadata of tables it creates. The warning message demonstrates it can't for BIGINT's. The attached patch fixes it.

Comments (4)

  1. Log in to comment