#33366: Foreign key to settings.AUTH_USER_MODEL causes hard-coded alteration in
migration
-------------------------------------+-------------------------------------
     Reporter:  Andrew Chen Wang     |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  4.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Pedro Schlickmann Mendes):

 This is probably not a bug.

 I tested your package with django 3.2 and `makemigrations` returned `No
 changes detected`. I also tested it with Django 4.0 and `makemigrations`
 altered all models with `settings.AUTH_USER_MODEL` as a ForeignKey. I am
 not an expert but I think this is intended by the Django team.

 I also tested changing your ForeignKey references to `get_user_model()`
 instead of `settings.AUTH_USER_MODEL`, and the results were the same, no
 changes in 3.2, changes in 4.0.''

 If there are no objections, I'll close this in a few days.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33366#comment:3>
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/074.2b73745c1538fffab08d787212f9f550%40djangoproject.com.

Reply via email to