#34898: Adding non-deterministic collations to unique CharFields crashes on
PostgreSQL.
-------------------------------------+-------------------------------------
     Reporter:  Mariusz Felisiak     |                    Owner:  Tom
                                     |  Carrick
         Type:  Bug                  |                   Status:  assigned
    Component:  Migrations           |                  Version:  4.2
     Severity:  Normal               |               Resolution:
     Keywords:  PostgreSQL           |             Triage Stage:  Accepted
  collation                          |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Chris Hodder):

 This issue also occurs in the case of creating a char field as a primary
 key as well as adding it to a nondeterministic collation, example model
 code:


 {{{
 class Example(models.Model):
     name = models.CharField(
         max_length=255,
         primary_key=True,
         db_collation="case_insensitive",
     )

 }}}

 The resulting migration won't run with a
 `Django.db.utils.NotSupportedError: nondeterministic collations are not
 supported for operator class "varchar_pattern_ops"` error.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/34898#comment:16>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019c9eba6533-23c9597e-8364-447b-bfcd-ed1ea05f889d-000000%40eu-central-1.amazonses.com.

Reply via email to