diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-06-30 18:48:01 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-06-30 18:48:01 -0400 |
commit | 9ae8de1f65c89f33f4ffae33023e481955f72244 (patch) | |
tree | 23ad61fc58654c78c409a6cc332db5080315ca0d /lib/sqlalchemy/schema.py | |
parent | 287e9d6a77ef20da98c28901fd118f4401aaab41 (diff) | |
download | sqlalchemy-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.py | 1 |
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 \ |