Closes #12318: Ignore case when determining uniquess of name & slug fields #977

Closed
opened 2026-04-05 19:25:34 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jeremystretch on 10/24/2025

Closes: #12318

  • Introduce two new database collations for und-u-ks-level2 (case-insensitive) and und-u-kn-true-ks-level2 (case-insensitive natural sort)
  • Alter all model CharFields which are referenced for uniqueness to use a case-insensitive collation in the PostgreSQL database
  • Remove all varchar_pattern_ops indexes attached to these fields (not supported with non-deterministic collations)
  • Alter the UniqueConstraints on the Device and VirtualMachine models to reference the name field without calling Lower()
*Originally created by @jeremystretch on 10/24/2025* ### Closes: #12318 - Introduce two new database collations for `und-u-ks-level2` (case-insensitive) and `und-u-kn-true-ks-level2` (case-insensitive natural sort) - Alter all model CharFields which are referenced for uniqueness to use a case-insensitive collation in the PostgreSQL database - Remove all `varchar_pattern_ops` indexes attached to these fields (not supported with non-deterministic collations) - Alter the UniqueConstraints on the Device and VirtualMachine models to reference the `name` field without calling `Lower()`
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#977