summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/mysql')
-rw-r--r--django/db/backends/mysql/introspection.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/backends/mysql/introspection.py b/django/db/backends/mysql/introspection.py
index 93e89c1263..477478ca9d 100644
--- a/django/db/backends/mysql/introspection.py
+++ b/django/db/backends/mysql/introspection.py
@@ -103,6 +103,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
continue
if row[4] not in indexes:
indexes[row[4]] = {'primary_key': False, 'unique': False}
+ # It's possible to have the unique and PK constraints in separate indexes.
if row[2] == 'PRIMARY':
indexes[row[4]]['primary_key'] = True
if not bool(row[1]):