diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-05-23 14:59:32 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-05-23 14:59:32 +0000 |
| commit | 5156d5141af04fe86ba317eadb73d8442eddc651 (patch) | |
| tree | 7284c66acd79e1cef9fcce50d149266a63c54882 /lib/sqlalchemy | |
| parent | 1bbee677746e344336667bf97fd16d3df8af0c89 (diff) | |
| download | sqlalchemy-5156d5141af04fe86ba317eadb73d8442eddc651.tar.gz | |
anonymous indexes use column._label to avoid name collisions
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/schema.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index 3fc3752c7..c88249011 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -208,12 +208,12 @@ class Table(sql.TableClause, SchemaItem): raise ValueError("index and unique may not both be specified") if index: if index is True: - name = 'ix_%s' % column.name + name = 'ix_%s' % column._label else: name = index elif unique: if unique is True: - name = 'ux_%s' % column.name + name = 'ux_%s' % column._label else: name = unique # find this index in self.indexes |
