summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/schema.py
diff options
context:
space:
mode:
authorHannes Ljungberg <hannes@5monkeys.se>2020-12-23 11:08:42 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-12-23 11:16:13 +0100
commitd23cb83c99bc77c23e2fb5bff378d2f2092d7b29 (patch)
tree90f07a39de035cb15e12574026a19c51d5ed2a7a /django/db/backends/mysql/schema.py
parent3bca95cca277a1e205c10d4fd3ea8527c6fcc34a (diff)
downloaddjango-d23cb83c99bc77c23e2fb5bff378d2f2092d7b29.tar.gz
Refs #26167 -- Made DatabaseSchemaEditor._create_index_sql()'s fields argument optional and kwarg-only.
Diffstat (limited to 'django/db/backends/mysql/schema.py')
-rw-r--r--django/db/backends/mysql/schema.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/db/backends/mysql/schema.py b/django/db/backends/mysql/schema.py
index 728f2f6c64..b7268e2b23 100644
--- a/django/db/backends/mysql/schema.py
+++ b/django/db/backends/mysql/schema.py
@@ -126,7 +126,9 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
if first_field.get_internal_type() == 'ForeignKey':
constraint_names = self._constraint_names(model, [first_field.column], index=True)
if not constraint_names:
- self.execute(self._create_index_sql(model, [first_field], suffix=""))
+ self.execute(
+ self._create_index_sql(model, fields=[first_field], suffix='')
+ )
return super()._delete_composed_index(model, fields, *args)
def _set_field_new_type_null_status(self, field, new_type):