1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Changed get_indexes() hook from [2346] to return 'primary_key' instead of 'keyname'

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2006-02-18 21:57:38 +00:00
parent 27b41fd9de
commit 5710c6e2db
2 changed files with 3 additions and 3 deletions

View File

@@ -636,7 +636,7 @@ def inspectdb(db_name):
# Add primary_key and unique, if necessary.
column_name = extra_params.get('db_column', att_name)
if column_name in indexes:
if indexes[column_name]['keyname'] == 'PRIMARY':
if indexes[column_name]['primary_key']:
extra_params['primary_key'] = True
elif indexes[column_name]['unique']:
extra_params['unique'] = True