#29755: Infinite Django Migrations
-------------------------------------+-------------------------------------
               Reporter:  Aamir      |          Owner:  nobody
  Rind                               |
                   Type:  Bug        |         Status:  new
              Component:  Core       |        Version:  2.1
  (Management commands)              |       Keywords:
               Severity:  Normal     |  
migrations,unlimited,infinite,makemigrations
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Consider there exists following models:


 {{{
 from django.db import models


 class Parent(models.Model):
     name = models.CharField(max_length=50)


 class Child(models.Model):
     parent = models.ForeignKey('polls.Parent')

     class Meta:
         default_related_name = 'children'
         ordering = ('id', )
 }}}


 - Run `makemigrations` command this will create `0001_initial.py`
 migration.
 - Now go to `models.py` and remove `default_related_name` from `Child`
 model.
 - Run `makemigrations` multiple times and it will create same migration
 again and again.

 I have created a project to reproduce this issue:
 https://github.com/intellisense/django-infinite-migrations

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29755>
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/055.b8c8160d625cc565952dfbfcc6e4d82f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to