You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
django-admin makemigrations gives these errors when you add a Meta.indexes = [...] on a base model:
myapp.SpecificThing: (models.E016) 'indexes' refers to field 'permissions' which is not local to model 'SpecificThing'.
HINT: This issue may be caused by multi-table inheritance.
myapp.OtherThing: (models.E016) 'indexes' refers to field 'permissions' which is not local to model 'OtherThing'.
HINT: This issue may be caused by multi-table inheritance.
The text was updated successfully, but these errors were encountered:
I encountered this yesterday. It seems that TypedModel changes all fields to appear in the _meta.local_fields of the parent class, and none in the child class. Thus an index on a child class fails this check because it thinks the field lives on its parent table, when it doesn't.
django-admin makemigrations
gives these errors when you add aMeta.indexes = [...]
on a base model:The text was updated successfully, but these errors were encountered: