Opened 8 months ago

Closed 8 months ago

#33872 closed Cleanup/optimization (fixed)

Deprecate CICharField, CIEmailField, CITextField.

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: contrib.postgres Version: dev
Severity: Normal Keywords:
Cc: Tom Carrick, Carlton Gibson Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Django 3.2+ supports db_collation for CharField and TextField (see #31777) along with migration operations (CreateCollation(), RemoveCollation()) and the database function Collate() (see #21181). Moreover CI fields and the entire citext module are discouraged since PostgreSQL 12 (which is the minimum version supported by Django 4.2+) in favor of collations. I think it's time to deprecate CI fields from the contrib.postgres in favor of CharField and TextField with case insensitive collations.

Related discussion on the django-developers mailing list.

Change History (5)

comment:1 Changed 8 months ago by Mariusz Felisiak

Owner: set to Mariusz Felisiak
Status: newassigned

comment:2 Changed 8 months ago by Carlton Gibson

Triage Stage: UnreviewedAccepted

Accepting based on discussion (+3:-0 I think)

Points were to ensure we document a migration, and perhaps how to avoid needing the CI field ("...put an index on UPPER and make sure you always use iexact.")

comment:3 Changed 8 months ago by Mariusz Felisiak

Has patch: set

comment:4 Changed 8 months ago by Carlton Gibson

Triage Stage: AcceptedReady for checkin

comment:5 Changed 8 months ago by GitHub <noreply@…>

Resolution: fixed
Status: assignedclosed

In cb791a25:

Fixed #33872 -- Deprecated django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField.

Note: See TracTickets for help on using tickets.
Back to Top