#22889: Proper handling of to_field in deconstruct for AUTH_USER_MODEL foreign 
key
-------------------------------------+-------------------------------------
               Reporter:  timo       |          Owner:  nobody
                   Type:             |         Status:  new
  Cleanup/optimization               |        Version:  1.7-beta-2
              Component:             |       Keywords:
  Migrations                         |      Has patch:  0
               Severity:  Release    |    Needs tests:  0
  blocker                            |  Easy pickings:  0
           Triage Stage:  Accepted   |
    Needs documentation:  0          |
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 `to_field` shouldn't appear in the migration for a `ForeignKey` to
 `settings.AUTH_USER_MODEL`, otherwise the migration isn't usable if
 `settings.AUTH_USER_MODEL` uses a primary key with a name different than
 'id'.

 It's not necessary to include the field name, the default behavior of
 models.ForeignKey is to look up the primary key field name from the target
 model.

 from [https://github.com/django/django/pull/2840 this pull request].

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

Reply via email to