From 4d430fbf720e9362965cc962e5ac1fae3ff51500 Mon Sep 17 00:00:00 2001 From: Markus Holtermann Date: Sun, 12 Feb 2017 19:16:38 +0100 Subject: [PATCH] Refs #26167 -- Functional Indexes don't have a fields attribute Referring to that attribute in AddIndex.describe() will thus not work. The description of an index should instead live in the index class definition of the index. --- django/db/migrations/operations/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py index f2b90c11e39ad..7daebab0486a4 100644 --- a/django/db/migrations/operations/models.py +++ b/django/db/migrations/operations/models.py @@ -784,9 +784,8 @@ def deconstruct(self): ) def describe(self): - return 'Create index %s on field(s) %s of model %s' % ( + return 'Create index %s for model %s' % ( self.index.name, - ', '.join(self.index.fields), self.model_name, )