1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +00:00

boulder-oracle-sprint: Fixed #3743 by not creating another index when

the column is a PK and the backend is Oracle.


git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Boulder Sprinters
2007-04-03 21:59:56 +00:00
parent a3053273c8
commit 5bcf13b607
7 changed files with 7 additions and 1 deletions

View File

@@ -482,7 +482,7 @@ def get_sql_indexes_for_model(model):
output = []
for f in model._meta.fields:
if f.db_index:
if f.db_index and not (f.primary_key and backend.autoindexes_primary_keys):
unique = f.unique and 'UNIQUE ' or ''
output.append(
style.SQL_KEYWORD('CREATE %sINDEX' % unique) + ' ' + \