#25413: Add an option to squashmigrations to remove RunPython and RunSQL
-----------------------------+------------------------------------
     Reporter:  mjtamlyn     |                    Owner:  nobody
         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
-----------------------------+------------------------------------
Changes (by timgraham):

 * stage:  Unreviewed => Accepted


Comment:

 I had this use case when squashing migrations for some djangoproject.com
 work. What I did was generate a new "initial" migration (which contained
 only `CreateModel` operations instead of many `AlterField` operations that
 weren't optimized despite the fact that `RunPython` weren't between them)
 for the app and then copied the "replaces" attribute from the migration
 that `squashmigrations` generated to generate my own squashed migration. I
 wonder if this is a workflow we should recommend (automating it could be
 nice, I guess).

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

Reply via email to