* cc: Lily Foote, Hannes Ljungberg (added)
* stage: Unreviewed => Accepted
Comment:
Thanks for the report. I'm puzzled because almost
[https://github.com/django/django/blob/f412add786dfc18424eee6281ec8cc97220b04fc/tests/postgres_tests/test_constraints.py#L239-L244
the same works] in our test suite and I confirmed that both `Index` and
`UniqueConstraint` crash on:
{{{#!python
class Location(models.Model):
name = models.CharField(max_length=255)
scene = models.TextField(null=True)
class Meta:
indexes = [
models.Index(
OpClass(Upper('name'), name='varchar_pattern_ops'),
name='uppercase_name_index'
),
]
constraints = [
models.UniqueConstraint(
OpClass(Upper("scene"), name="varchar_pattern_ops"),
name="test_opclass_func",
)
]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35079#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.