#24870: Create --update flag for makemigrations management command, mimicking
South's one.
-----------------------------------+--------------------------------------
     Reporter:  dukebody           |                    Owner:  nobody
         Type:  New feature        |                   Status:  new
    Component:  Migrations         |                  Version:  1.8
     Severity:  Normal             |               Resolution:
     Keywords:  migrations, south  |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------

Comment (by andrewgodwin):

 It's certainly possible, though more complicated than before in South
 because of the multi-app nature of makemigrations - but also easier
 because of the ease of programatically parsing and writing migration
 files.

 What this would be, in essence, is something that runs makemigrations and
 glues the first migration it makes for each app to the most recent one
 that already exists. The pain points I forsee are:

 * Migration files that have custom code (RunPython especially, but also
 any non-standard operation class) cannot be round-tripped through the
 parser and then out through the writer, so they could not be appended
 onto.

 * Dependencies would have to be checked to make sure this merging of the
 new migrations into old does not cause dependency loops.

 * It will occasionally have to just make new migrations anyway - it's more
 asking for a "best effort" attempt to make things work.

 That said, I think it's not too complicated, and shares enough of these
 challenges with squashing (it's basically squashing the new migrations
 makemigrations creates into the last ones of the existing set), that we
 should aim to do it at some point.

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

Reply via email to