Squash all migrations before production deployment #376
Labels
No labels
automation
backend
bug
contributor experience
data
deployment
documentation
duplicate
good first issue
help wanted
nice to have
notifications
package maintainer
performance
skin
tech debt
user story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-community/nix-security-tracker#376
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We have accumulated ~40 migrations, some of which are fairly expensive. Squash them before deployment, otherwise we will have to run through them on every deployment.
Is this really necessary currently? Even though Django can squash migraton, the documentation mentions this wouldn't be a problem and if you ever want to do it it's usually when you have multiple hundreds of migrations (which we're not close to having).
Django doesn't re-run migrations on every deployment, it knows which migrations have run and only runs the new ones.
That's true but it runs them on every test, because we start with a fresh deployment. That could be avoided by providing a database dump, but that opens a different can of worms: how and where to keep an up-to-date one?