diff --git a/django/core/db/backends/mysql.py b/django/core/db/backends/mysql.py index 4f80dd0d978..c4b2e870ec1 100644 --- a/django/core/db/backends/mysql.py +++ b/django/core/db/backends/mysql.py @@ -136,7 +136,12 @@ def get_relations(cursor, table_name): raise NotImplementedError def get_indexes(cursor, table_name): - "Returns a dict of indexes for given table" + """ + Returns a dictionary of fieldname -> infodict for the given table, + where each infodict is in the format: + {'keyname': 'name of key', + 'unique': boolean representing whether it's a unique index} + """ cursor.execute("SHOW INDEX FROM %s" % DatabaseWrapper().quote_name(table_name)) indexes = {} for row in cursor.fetchall():