[Django]-Error adding GinIndex to model in Django with Postgres

3👍

Inside the migration file created by Django for adding the GinIndex, add the following:

from django.contrib.postgres.operations import BtreeGinExtension

and then add this to the inside of the operations list, ie:

operations = [
    BtreeGinExtension()
    ...
]

Run this migration again and it should go through.

Leave a comment