#26064: Move migration operation reduction logic to their respective class.
-------------------------------------+-------------------------------------
     Reporter:  charettes            |                    Owner:  charettes
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Migrations           |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by carljm):

 Hmm, this is neat, and if there isn't a performance hit I think it's
 probably worth implementing just to see what people do with the improved
 flexibility, but I am skeptical about just how useful this will be in
 practice for the use case described in the ticket. To put my skepticism in
 brief: is it actually easier to write that reduce method in advance,
 anticipating all the various schema alterations that might surround your
 operation and how you'd return an adjusted version of your operation to
 account for them, than it is to just take care of it manually when
 squashing? Even if you're using "squashmigrations" rather than the "full
 reset" approach, "taking care of it manually" is just a matter of removing
 the data migration, adjusting its successor to point to its parent, then
 squashing, then re-appending (and modifying as necessary) the data
 migration. Squashing is done infrequently enough that I have a hard time
 imagining when I'd actually choose to write and test a fully parametrized
 operation with a custom reduce method instead of just doing that manual
 dance every now and then. Maybe I just don't use initial-data migrations
 enough? Or don't squash frequently enough?

--
Ticket URL: <https://code.djangoproject.com/ticket/26064#comment:6>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.6932adacc91eb584e3535b51ab0bc3a8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to