Re: Ideas for migrations squashing improvements

2015-05-22 Thread Piotr Maliński
I do squash one app at a time: - squash and commit - remove old migrations, "replaces", and fixing names in dependencies - and commit - optimize squash: remove RunPython/RunSQL, then play with operations order to merge all possible operations - and commit optimized version The problem is that i

Re: Ideas for migrations squashing improvements

2015-05-22 Thread Steve Jalim
Yep, the issue I've been having is squashing more than one app. Once I've got my head around it, i'll write it up and poss submit a documentation ticket to help On 22 May 2015 at 12:05, Piotr Maliński wrote: > It should allow squash all migrations of one app without any dependencies > issues. Sq

Re: Ideas for migrations squashing improvements

2015-05-22 Thread Piotr Maliński
It should allow squash all migrations of one app without any dependencies issues. Squashing may have problems if a model was created and later removed or when removing RunPython/SQL operations or when reordering operations to make the optimizer merge them into less operations (like getting bad

Re: Ideas for migrations squashing improvements

2015-05-22 Thread Steve Jalim
Amen to 3 and 3a - that's been proving one of the fiddliest aspects when there are lots of migrations to squash - trial-end-error checking of how many you can get away with squashing in one go while avoiding dependency issues from other apps On Thursday, May 21, 2015 at 11:08:42 AM UTC+1, Piotr

Ideas for migrations squashing improvements

2015-05-21 Thread Piotr Maliński
I made some tricky migration squashing in few projects recently. It works but still could be made better. 1. squashed migrations could have explicit flag indicating that it's a squash-initial migration. More complex squashes or optimizing squash can lead to problems when it will not fake but t