-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove old squashed migrations #1778
Conversation
ac9303e
to
25530dd
Compare
8c3b3c5
to
6baea82
Compare
25530dd
to
36f7716
Compare
6baea82
to
42d3e46
Compare
36f7716
to
2b64428
Compare
42d3e46
to
29afead
Compare
2b64428
to
dec88af
Compare
29afead
to
2c8d323
Compare
I've never understood the rationale for squashing migrations. Other frameworks (like SQLAlchemy?) do it as a matter of course, IIUC, so there must be a good reason for it. To me it's a sort of lossy compression so there's some value in keeping it around (to detail the history of migrations). I'm curious what the downside is. |
One benefit is test performance: each time the tests are run, since a fresh database is used, all migrations must be applied fresh. This isn't typically too big of a performance cost, but eventually it adds up if numerous intermediate tables / columns / constraints need to be created and destroyed just to get to the end state. This PR was more motivated by the fact that many old the old migrations had names which violated Python naming guidelines (they contained |
2c8d323
to
2b78060
Compare
Now that #1777 has been applied to production, this should be safe to merge. @danlamanna Can you confirm? |
@danlamanna just confirmed it. |
🚀 PR was released in |
Hi @waxlamp and @brianhelba -- just wanted to follow up here.... Squashing of migrations in Also, @brianhelba, in regards to performance bottlenecks in testing, even with limited migrations, I'd encourage the usage of the --reuse-db flag, as it is intended to specifically resolve your pain point here. I think I'd like to have a larger discussion here (perhaps Dandi standup would be the right forum) for how we navigate over-arching changes in |
We should at least wait until production servers are stable to merge this.