Opened 3 years ago

Last modified 3 years ago

#24529 new New feature

Allow double squashing of migrations

Reported by: Markus Holtermann Owned by: nobody
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

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

comment:1 Changed 3 years ago by Simon Charette

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