#32321: Add system checks for invalid model field names for functional indexes 
in
Meta.indexes.
-------------------------------------+-------------------------------------
     Reporter:  Mariusz Felisiak     |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  3.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Hasan Ramezani):

 Mariusz,
 When I try to run the
 
[https://code.djangoproject.com/timeline?from=2021-01-05T00%3A49%3A56-06%3A00&precision=second
 tests] that you added to the ticket, I get

 `ValueError('Index.fields must be a list or tuple.')`

 it means currently, `models.Index` doesn't support `models.F('height') /
 (models.F('weight__abs') + models.Value(5))` and
 `Lower('missing_field').desc()`  as index `fields`.

 Should we add support for these kinds of  fields to `models.Index`?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32321#comment:1>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/065.bcaafce6c501b154a059c368d0ea523d%40djangoproject.com.

Reply via email to