addons icon indicating copy to clipboard operation
addons copied to clipboard

Squash some old migrations

Open diox opened this issue 2 years ago • 4 comments

We have a bunch of migrations that were played in all envs a long time ago. We should look into squashing them to reduce time spent setting up the database in tests/initial env setup.

┆Issue is synchronized with this Jira Task

diox avatar Feb 21 '23 12:02 diox

Not sure if you noticed this at the time this issue was filed, but if the migration to drop File.reviewed is included it breaks other migrations that relied on the __reviewed accessor, so squashing the old migrations should help with that.

eviljeff avatar Nov 07 '23 14:11 eviljeff

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-267

KevinMind avatar May 03 '24 17:05 KevinMind

Interesting idea danielquinn.org/blog/collapsing-djangos-migrations/

So far, attempts at squashing have not been successful.

KevinMind avatar Jun 11 '24 09:06 KevinMind

Interesting idea danielquinn.org/blog/collapsing-djangos-migrations/

It screws over anyone with a local database that isn't up to date with master but that's an edge case I guess. I'd be more interested in how "do the same on production" can be done in a safe and preprepared way.

So far, attempts at squashing have not been successful.

were there any attempts, or did we just lose interest because it was high effort for low gain (at the time, at least)?

eviljeff avatar Jun 11 '24 10:06 eviljeff

Found the way https://jacklinke.com/squashing-django-migrations-the-easy-way

KevinMind avatar May 15 '25 18:05 KevinMind