Opened 10 years ago

Last modified 6 days ago

#24529 assigned New feature

Allow double squashing of migrations

Reported by: Markus Holtermann Owned by: Georgi Yanchev
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Markus Holtermann, Raphael Gaschignard Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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:

  1. Remove the safeguard
  2. 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
  3. Add squashed migrations to the dependency list

Change History (14)

comment:1 by Simon Charette, 10 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Bruno Alla, 5 years ago

Owner: changed from nobody to Bruno Alla
Status: newassigned

comment:3 by Bruno Alla, 5 years ago

Owner: Bruno Alla removed
Status: assignednew

Deassigning as I'm no longer actively working on this.

comment:4 by Raphael Gaschignard, 4 years ago

Cc: Raphael Gaschignard added
Owner: set to Raphael Gaschignard
Status: newassigned

I have a potential patch for this one that I'm pretty satisfied with, so self-assigning this one.

comment:5 by Raphael Gaschignard, 4 years ago

Has patch: set

comment:6 by Jacob Walls, 3 years ago

Patch needs improvement: set

comment:7 by Raphael Gaschignard, 3 years ago

Patch needs improvement: unset

comment:8 by Raphael Gaschignard, 3 years ago

Needs documentation: unset
Needs tests: unset

Unchecked all the "Needs..." to request review on the implementation in principle.

comment:9 by Jacob Walls, 3 years ago

Needs documentation: set
Patch needs improvement: set

comment:10 by Raphael Gaschignard, 3 years ago

Needs documentation: unset
Patch needs improvement: unset

comment:11 by Mariusz Felisiak, 3 years ago

Patch needs improvement: set

comment:12 by Jacob Walls, 2 months ago

Owner: changed from Raphael Gaschignard to Georgi Yanchev
Patch needs improvement: unset

comment:13 by Sarah Boyce, 4 weeks ago

Patch needs improvement: set

comment:14 by Georgi Yanchev, 6 days ago

Patch needs improvement: unset
Note: See TracTickets for help on using tickets.
Back to Top