#29378: migration does not consistently rename field "id" to "model_id" 
depending
on model name
-----------------------------------------+------------------------
               Reporter:  Shadi Akiki    |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  2.0
               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              |
-----------------------------------------+------------------------
 In the case where the model is

 {{{
  class Something(models.Model):
     field1 = ...
     field2 = ...
 }}}

 adding a field

 {{{
     something_id = models.AutoField(verbose_name='ID', serialize=False,
 auto_created=True, primary_key=True)^M
 }}}

 generates a "rename" in the migration from "id" to "something_id".

 However, for

 {{{
  class MyModel(models.Model):
     field1 = ...
     field2 = ...
 }}}

 adding a field

 {{{
     mymodel_id = models.AutoField(verbose_name='ID', serialize=False,
 auto_created=True, primary_key=True)^M
 }}}

 does not generate a "rename" in the migration.

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

Reply via email to