#36803: Make AlterField a no-op when ManyToManyField's through.db_table remains 
the
same between renames.
-------------------------------------+-------------------------------------
     Reporter:  Clifford Gama        |                    Owner:  Clifford
         Type:                       |  Gama
  Cleanup/optimization               |                   Status:  closed
    Component:  Migrations           |                  Version:  6.0
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  AlterField, no-op,   |             Triage Stage:  Accepted
  ManyToManyField                    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Clifford Gama):

 On another note, I just found out that:
 {{{#!python
 class Book(models.Model):
     pass


 class Author(models.Model):
     books = models.ManyToManyField(Book, through="AuthorBook")


 class AuthorBook(models.Model):
     book = models.ForeignKey(Book, models.CASCADE)
     author = models.ForeignKey(Author, models.CASCADE)
 }}}

 renaming books, to `articles` without changing anything else results in a
 `RemoveField` and `AddField`, though nothing has changed in the schema
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36803#comment:4>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019b2c1f38c1-ee5b723b-d603-4d28-abb8-522e5008e71b-000000%40eu-central-1.amazonses.com.

Reply via email to