- changed status to resolved
use type_affinity instead of isinstance() for integer check within _autoincrement_column
Issue #2005
resolved
diff -r a590e5db8aece17e93371bca290d2e205528e34c lib/sqlalchemy/schema.py
--- a/lib/sqlalchemy/schema.py Sat Dec 18 13:05:20 2010 -0500
+++ b/lib/sqlalchemy/schema.py Sat Dec 18 15:31:16 2010 -0500
@@ -324,7 +324,7 @@
def _autoincrement_column(self):
for col in self.primary_key:
if col.autoincrement and \
- isinstance(col.type, types.Integer) and \
+ issubclass(col.type._type_affinity, types.Integer) and \
not col.foreign_keys and \
isinstance(col.default, (type(None), Sequence)):
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.7.0 (automated comment)
- Log in to comment
67e0f356b2093fdc03303d50be1f89e75e847c7f