#33947: Adding db_index to a field inherited from an Abstract class does not
propagate the change to the models subclassing it
-------------------------------------+-------------------------------------
               Reporter:  awiebe     |          Owner:  nobody
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Database   |        Version:  3.2
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I have a bunch of Models of the form
 {{{
 #!div style="font-size: 80%"
   {{{#!python
   class AbstractOwnershipModel(models.Model):
      owner_user= models.ForeignKey('auth.User')
      class Meta:
       abstract = True
   }}}
 }}}

 Which I tried to change to
 {{{
 #!div style="font-size: 80%"
   {{{#!python
   class AbstractOwnershipModel(models.Model):
      owner_user= models.ForeignKey('auth.User',db_index=True)
      class Meta:
       abstract = True
   }}}
 }}}

 But makemigrations reports that there are no changes even though I would
 expect a bunch of indexes to be created.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33947>
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/01070182c7b73a52-a3a94ca4-a37c-4efe-8fec-e33430de4996-000000%40eu-central-1.amazonses.com.

Reply via email to