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 |
Description
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
Owner: | set to Mariusz Felisiak |
---|---|
Status: | new → assigned |
comment:2 Changed 8 months ago by
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 Changed 8 months ago by
Triage Stage: | Accepted → Ready for checkin |
---|
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.")