Opened 8 years ago

Last modified 3 years ago

#27844 closed New feature

Add a management command to run the optimizer on a single migration — at Initial Version

Reported by: Raphael Gaschignard Owned by: nobody
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: David Wobrock Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Because the migration optimizer still has a bit of trouble with reducing operations, you often want to edit squashed migrations and re-run it through the optimizer.

The attached patch contains an implementation of a management command, optimizemigration, that will help speed up this process.

optimizemigration app_name migration_name reads a single migration, pass it through the optimizer, and then rewrite the result to disk. Unlike squashmigrations, this ignores things like the squashed-ness of the migration.

Change History (1)

by Raphael Gaschignard, 8 years ago

Attachment: optimizemigration.py added
Note: See TracTickets for help on using tickets.
Back to Top