diff options
Diffstat (limited to 'django/db/backends/postgresql/schema.py')
-rw-r--r-- | django/db/backends/postgresql/schema.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/schema.py b/django/db/backends/postgresql/schema.py index bc03a12e8d..f34d03ff8c 100644 --- a/django/db/backends/postgresql/schema.py +++ b/django/db/backends/postgresql/schema.py @@ -29,6 +29,11 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): # a second index that specifies their operator class, which is # needed when performing correct LIKE queries outside the # C locale. See #12234. + # + # The same doesn't apply to array fields such as varchar[size] + # and text[size], so skip them. + if '[' in db_type: + continue if db_type.startswith('varchar'): output.append(self._create_index_sql( model, [field], suffix='_like', sql=self.sql_create_varchar_index)) |