Page MenuHomePhabricator

Squash Django migration files
Closed, ResolvedPublic


We have a full migration history from the start of the project for every migration made. This leads to a bunch of redundancy and a longer time to run migrations than is necessary.

We don't need the full migration history, so we can squash them all down to individual files per-app.

Related Objects


Event Timeline

Hello I understand the task will raise a pull request soon for this

Samwalton9 triaged this task as Lowest priority.Nov 4 2020, 2:54 PM
Samwalton9 moved this task from Ready to Review on the The-Wikipedia-Library (Kanban) board.

Thanks! Our engineers are quite busy at the moment and this is a very low priority task, so apologies if it takes some time for review.

@NirmalaSainsara You have some guidance in your PR, do you need anything else from us to continue with this?

Hey sorry for the delay I will get back on it before this weekend.

Can I create a PR on this, if nobody is currently working on this?

Samwalton9 added a subscriber: NirmalaSainsara.

Please feel free :)

I was getting Circular Dependency Error if I squash the resources migrations into one file. So, instead I squashed resources migrations 0001 to 0062 into one file and 0063 to 0084 into another file, to avoid Circular Dependancy Error. Is that okay?

That's a huge improvement over what we have; I would certainly take it!

Tag and TextFieldTag aren't imported in the squashed resources migration file. Did the build failed just due to that or there are some other issues as well?

Those were data migrations that didn't need to happen anymore anyway. They relied on a dependency that we no longer have. It turns out that we needed this done asap, so I just modified your pr slightly and merged. Sorry that you didn't get more guidance on this one, but thanks for your work!

Samwalton9 claimed this task.