Skip to content

Instantly share code, notes, and snippets.

@vad vad/stacktrace
Created Nov 5, 2016

What would you like to do?
GIN on ArrayField(CITextField)
$ ./ migrate ginapp
Operations to perform:
Apply all migrations: ginapp
Running migrations:
Applying ginapp.0001_initial...Traceback (most recent call last):
File "./", line 22, in <module>
File "/home/vad/Source/django/django/core/management/", line 357, in execute_from_command_line
File "/home/vad/Source/django/django/core/management/", line 349, in execute
File "/home/vad/Source/django/django/core/management/", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/vad/Source/django/django/core/management/", line 330, in execute
output = self.handle(*args, **options)
File "/home/vad/Source/django/django/core/management/commands/", line 204, in handle
File "/home/vad/Source/django/django/db/migrations/", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/home/vad/Source/django/django/db/migrations/", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/home/vad/Source/django/django/db/migrations/", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/vad/Source/django/django/db/migrations/", line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/home/vad/Source/django/django/db/migrations/operations/", line 789, in database_forwards
schema_editor.add_index(model, self.index)
File "/home/vad/Source/django/django/db/backends/base/", line 322, in add_index
self.execute(index.create_sql(model, self))
File "/home/vad/Source/django/django/db/backends/base/", line 111, in execute
cursor.execute(sql, params)
File "/home/vad/Source/django/django/db/backends/", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/vad/Source/django/django/db/backends/", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/vad/Source/django/django/db/", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/vad/Source/django/django/db/backends/", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: data type citext[] has no default operator class for access method "gin"
HINT: You must specify an operator class for the index or define a default operator class for the data type.

This comment has been minimized.

Copy link

aidanak commented Jul 5, 2017

Hi :) How you have solved this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.