Opened 5 years ago

Last modified 5 months ago

#24529 new New feature

Allow double squashing of migrations

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


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:

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 (3)

comment:1 Changed 5 years ago by Simon Charette

Triage Stage: UnreviewedAccepted

comment:2 Changed 10 months ago by Bruno Alla

Owner: changed from nobody to Bruno Alla
Status: newassigned

comment:3 Changed 5 months ago by Bruno Alla

Owner: Bruno Alla deleted
Status: assignednew

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

Note: See TracTickets for help on using tickets.
Back to Top