diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-07-21 11:33:47 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-07-21 11:33:47 -0400 |
| commit | dabe38bf56dd18876466f07667c386c56ba88de4 (patch) | |
| tree | 7d4fa21f1b00668defac05dbcb68230ceddea72e /lib/sqlalchemy/dialects/sqlite | |
| parent | 1b0bd4b23f572f581ded0395b78a3371f889ee21 (diff) | |
| download | sqlalchemy-dabe38bf56dd18876466f07667c386c56ba88de4.tar.gz | |
- Changed the scheme used to generate truncated
"auto" index names when using the "index=True"
flag on Column. The truncation only takes
place with the auto-generated name, not one
that is user-defined (an error would be
raised instead), and the truncation scheme
itself is now based on a fragment of an md5
hash of the identifier name, so that multiple
indexes on columns with similar names still
have unique names. [ticket:1855]
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite')
| -rw-r--r-- | lib/sqlalchemy/dialects/sqlite/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index 030b45aff..2d9e56baf 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -280,7 +280,7 @@ class SQLiteDDLCompiler(compiler.DDLCompiler): text += "UNIQUE " text += "INDEX %s ON %s (%s)" \ % (preparer.format_index(index, - name=self._validate_identifier(index.name, True)), + name=self._index_identifier(index.name)), preparer.format_table(index.table, use_schema=False), ', '.join(preparer.quote(c.name, c.quote) for c in index.columns)) |
