Page MenuHomePhabricator

Squash Django migration files
Closed, ResolvedPublic

Description

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

StatusSubtypeAssignedTask
OpenNone
Resolved Samwalton9-WMF

Event Timeline

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

Samwalton9-WMF 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?

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!