summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/schema.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-06-30 18:48:01 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-06-30 18:48:01 -0400
commit9ae8de1f65c89f33f4ffae33023e481955f72244 (patch)
tree23ad61fc58654c78c409a6cc332db5080315ca0d /lib/sqlalchemy/schema.py
parent287e9d6a77ef20da98c28901fd118f4401aaab41 (diff)
downloadsqlalchemy-9ae8de1f65c89f33f4ffae33023e481955f72244.tar.gz
- Fixed bug where "autoincrement" detection on
Table would fail if the type had no "affinity" value, in particular this would occur when using the UUID example on the site that uses TypeEngine as the "impl".
Diffstat (limited to 'lib/sqlalchemy/schema.py')
-rw-r--r--lib/sqlalchemy/schema.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py
index 9a49c785e..7323a5657 100644
--- a/lib/sqlalchemy/schema.py
+++ b/lib/sqlalchemy/schema.py
@@ -390,6 +390,7 @@ class Table(SchemaItem, expression.TableClause):
def _autoincrement_column(self):
for col in self.primary_key:
if col.autoincrement and \
+ col.type._type_affinity is not None and \
issubclass(col.type._type_affinity, sqltypes.Integer) and \
not col.foreign_keys and \
isinstance(col.default, (type(None), Sequence)) and \