django-planet
Feb. 23, 2023

How to migrate from Django’s PostgreSQL CI Fields to use a case-insensitive collation

published by Adam Johnson
in blog Adam Johnson
original entry How to migrate from Django’s PostgreSQL CI Fields to use a case-insensitive collation

If you upgrade to Django 4.2, you may see system check warnings like:

example.User.email: (fields.W906) django.contrib.postgres.fields.CIEmailField is deprecated. Support for it (except in historical migrations) will be removed in Django 5.1.
    HINT: Use EmailField(db_collation="…") with a case-insensitive non-deterministic collation instead …