Combine migrations¶
This howto assumes we have django-linear-migrations installed, and that we have a migration file max_migration.txt for each app that contains the latest migration for that app.
To combine migrations 0025-0027 in the core app, where the last migration is 0027
-
Roll back migrations to before all the target migrations, e.g.
0024 -
Delete migration files to be combined.
-
Recreate
max_migration.txt -
Generate combined migration file
When to use this¶
- PRs can have multiple migration files that should be made into a single create migration for merging.
Who should use this¶
- Developers