Allow double squashing of migrations
While #23090 added a safeguard to prevent squashmigrations
from blowing up when squashing an already squashed migration, this should be possible in the future to ease transition for 3rd party projects.
It is generally possible to add a squashed migration as a dependency together with its replaced migrations (e.g. have 0001_initial
, 0002_second
and 0001_squashed_0002_second
in the dependency list). An example can be found here: https://github.com/MarkusH/django-ticket-triage/tree/0aac03c597c744909db60772b99c34c99ed7111d/app_a/migrations
The tasks I identified so far are for now:
- Remove the safeguard
- When squashing
0001_0002
and 0003
, the squashed migration 0001_0003
doesn't consider the already squashed migration operations and doesn't add them to it's operations list
- Add squashed migrations to the dependency list
Change History
(14)
Triage Stage: |
Unreviewed → Accepted
|
Owner: |
changed from nobody to Bruno Alla
|
Status: |
new → assigned
|
Owner: |
Bruno Alla removed
|
Status: |
assigned → new
|
Cc: |
Raphael Gaschignard added
|
Owner: |
set to Raphael Gaschignard
|
Status: |
new → assigned
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Needs documentation: |
unset
|
Needs tests: |
unset
|
Needs documentation: |
set
|
Patch needs improvement: |
set
|
Needs documentation: |
unset
|
Patch needs improvement: |
unset
|
Patch needs improvement: |
set
|
Owner: |
changed from Raphael Gaschignard to Georgi Yanchev
|
Patch needs improvement: |
unset
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Deassigning as I'm no longer actively working on this.