#29622: Indexes on JSONB paths fail system checks in 2.1
------------------------------------------------+------------------------
               Reporter:  James Howe            |          Owner:  nobody
                   Type:  Bug                   |         Status:  new
              Component:  Core (System checks)  |        Version:  2.1
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 I am using PostgreSQL and have some JSONField-type fields in my models.
 I had added some indexes to these, and they worked fine previously.
 {{{#!python
 class Meta:
     indexes = [
         models.Index(fields=['json_field__property'], name='my_idx'])
     ]
 }}}

 However, having just upgraded to Django 2.1, the checks on startup now
 fail:
 {{{
 ERRORS:
 myapp.MyModel: (models.E012) 'indexes' refers to the nonexistent field
 'json_field__property'.
 }}}

 My tests (run with pytest-django) all still work, so it seems to only be
 the system check that's the problem.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29622>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.f425014c2b44280307da42e9845fb152%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to