I am trying to use the Django CITextExtension PostgreSQL extension to create case-insensitive text fields in my database.
Concretely, here is how I am trying to use django.contrib.postgres.fields.CICharField
in my Expression
model to create a case-insensitive CharField in my database:
from django.contrib.postgres.fields import CICharField
class Expression(models.Model):
expression = CICharField(max_length=64, unique=True)
When I open the admin, however, and go into the Expression
s area I get:
OperationalError at /admin/dictionary/expression/ no such column: dictionary_expression.expression
I could not find anything at all on the internet about this particular issue. Why is CICharField
not creating a column in my database?
It could be because you are using a SQLite database. Make sure you are using a PostgreSQL database.