#23822: Serialize model managers in migrations
-----------------------------+------------------------------------
     Reporter:  MarkusH      |                    Owner:  MarkusH
         Type:  New feature  |                   Status:  new
    Component:  Migrations   |                  Version:  master
     Severity:  Normal       |               Resolution:
     Keywords:               |             Triage Stage:  Accepted
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+------------------------------------

Comment (by shaib):

 I don't understand how this is supposed to work. As a trivial example --
 suppose your (custom) user model changes over time, and grows a new
 mandatory field. This requires you to change your
 `UserManager.create_superuser()` accordingly. For the migration to still
 work, you need to serialize the actual manager code -- but you clearly do
 not intend this to be the case, and rightly so.

 No, I think that if you need to call some code in a migration, then this
 code needs to be made available to the migration, but requiring the
 manager to be compatible with all past migrations still around makes very
 little sense to me.

--
Ticket URL: <https://code.djangoproject.com/ticket/23822#comment:2>
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/065.1f95a8f981a895a84ea5b3e8a8bf8e9f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to