summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-02-17 20:43:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-02-17 20:43:17 -0500
commit74f26d2279dc730f0a8a8cc9a7824465dd465626 (patch)
treeca3ec0fdaafcfd4cdf2d748e68efb37648d42855 /lib
parent01cb94690d2d07431b2ff1b02577345c003be42b (diff)
downloadsqlalchemy-74f26d2279dc730f0a8a8cc9a7824465dd465626.tar.gz
- Fixed regression from 0.6 where SMALLINT and
BIGINT types would both generate SERIAL on an integer PK column, instead of SMALLINT and BIGSERIAL [ticket:2065]
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/types.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py
index a46cb1530..71b55f33f 100644
--- a/lib/sqlalchemy/types.py
+++ b/lib/sqlalchemy/types.py
@@ -1007,6 +1007,10 @@ class SmallInteger(Integer):
__visit_name__ = 'small_integer'
+ @property
+ def _type_affinity(self):
+ return SmallInteger
+
class BigInteger(Integer):
"""A type for bigger ``int`` integers.
@@ -1017,6 +1021,10 @@ class BigInteger(Integer):
__visit_name__ = 'big_integer'
+ @property
+ def _type_affinity(self):
+ return BigInteger
+
class Numeric(_DateAffinity, TypeEngine):
"""A type for fixed precision numbers.