#34416 closed Uncategorized (invalid)

Option start_migration_name for squashmigrations do not work properly

Reported by: pepe_bokitka69 Owned by: nobody
Component: Migrations Version: 4.1
Severity: Normal Keywords: squashmigrations start_migration_name
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi!

I have a set of migrations for app my_app:

0001_initial.py
0002_auto_20180119_1100.py
0003_auto_20180119_1200.py
0003_auto_20180119_1300.py
0004_auto_20180119_1400.py
0005_auto_20180119_1500.py

The most important part is the 4 digits number from name, for example: 0003

So, I want to squash from 0003_auto_20180119_1300 to 0005_auto_20180119_1500

I write: manage.py squashmigrations my_app 0003_auto_20180119_1300 0005

But Django squashes from 0003_auto_20180119_1200 to 0005_auto_20180119_1500.

As I understand squashmigrations command works with first 4 digits from migration name, so picks the first migration with that digits.

Is it that correct? Is it possible to use the entire name (e.g. 0003_auto_20180119_1300)?

Change History (1)

comment:1 by Mariusz Felisiak, 21 months ago

Resolution: invalid
Status: newclosed

It works for me with exactly the same migration names. Please use one of support channels.

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