Error adding GinIndex to model in Django with Postgres
I am trying to add GinIndex to my model however, I am getting an error when migrating: django.db.utils.ProgrammingError: data type character varying 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 is my model: class Post(models.Model): title = models.CharField(max_length=100) guid_url = models.CharField(max_length=255,unique=True, null=True) content = models.TextField(validators=[MaxLengthValidator(1200)]) author = models.ForeignKey(Profile, on_delete=models.CASCADE) date_pos
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.