[Django] #34416: Option start_migration_name for squashmigrations do not work properly

22 views
Skip to first unread message

Django

unread,
Mar 15, 2023, 12:35:32 PM3/15/23
to django-...@googlegroups.com
#34416: Option start_migration_name for squashmigrations do not work properly
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
pepe_bokitka69 |
Type: | Status: new
Uncategorized |
Component: | Version: 4.1
Migrations | Keywords: squashmigrations
Severity: Normal | start_migration_name
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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)?

--
Ticket URL: <https://code.djangoproject.com/ticket/34416>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 15, 2023, 2:19:51 PM3/15/23
to django-...@googlegroups.com
#34416: Option start_migration_name for squashmigrations do not work properly
-------------------------------------+-------------------------------------
Reporter: pepe_bokitka69 | Owner: nobody
Type: Uncategorized | Status: closed
Component: Migrations | Version: 4.1
Severity: Normal | Resolution: invalid
Keywords: squashmigrations | Triage Stage:
start_migration_name | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

It works for me with exactly the same migration names. Please use one of
[https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
support channels].

--
Ticket URL: <https://code.djangoproject.com/ticket/34416#comment:1>

Reply all
Reply to author
Forward
0 new messages