[Django] #31516: Change automatic migration naming from date-based to operation-based

35 views
Skip to first unread message

Django

unread,
Apr 26, 2020, 11:35:39 AM4/26/20
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: nobody
(Chainz) Johnson |
Type: New | Status: assigned
feature |
Component: | Version: 3.0
Migrations |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Following #31468 and a [https://groups.google.com/d/msg/django-
developers/Bmcd779Wdl4/mlQRVNVgAQAJ discussion on django-developers with
broad consensus], change the way migrations are automatically named from
date-based to operation-based. That is never name migrations based upon
the current date (`auto_YYYYMMDD`) and instead always based on the
operations they contain, rather than the current behaviour which uses
either style.

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

Django

unread,
Apr 28, 2020, 2:47:33 AM4/28/20
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: nobody
Johnson |
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* stage: Unreviewed => Accepted


Comment:

It looks like a luke-warmish OK on the list, so I guess we should push it
forward to review. Thanks Adam.

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

Django

unread,
May 5, 2020, 4:54:39 PM5/5/20
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: nobody
Johnson |
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carles Pina Estany):

* cc: Carles Pina Estany (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:2>

Django

unread,
Jun 1, 2020, 3:15:01 AM6/1/20
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: Adam
Johnson | (Chainz) Johnson

Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* owner: nobody => Adam (Chainz) Johnson
* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:3>

Django

unread,
Mar 10, 2021, 3:06:11 AM3/10/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+----------------------------------------
Reporter: Adam Johnson | Owner: Adam Johnson

Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+----------------------------------------

Comment (by Manav Agarwal):

Just a vague idea but I personally feel would be good to implement. In
order to avoid ellipsis in the name refer
[https://github.com/django/django/pull/12799#issuecomment-636657427 this
comment]. We may add a suffix like **"_+26"** (in case there are 26 other
changes).
This is just a vague representation but I feel if we may implement
something like this, it would be a better option. Need some suggestions.
I would be happy to submit a PR for this.

--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:4>

Django

unread,
Mar 10, 2021, 8:51:51 AM3/10/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal

Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Manav Agarwal):

* owner: Adam Johnson => Manav Agarwal


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:5>

Django

unread,
Mar 10, 2021, 11:47:59 AM3/10/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:6>

Django

unread,
Mar 10, 2021, 11:58:48 AM3/10/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/14109 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:7>

Django

unread,
Mar 10, 2021, 12:30:40 PM3/10/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:8>

Django

unread,
Mar 11, 2021, 1:57:23 AM3/11/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:9>

Django

unread,
Mar 11, 2021, 5:37:54 AM3/11/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:10>

Django

unread,
Mar 11, 2021, 5:41:24 AM3/11/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:11>

Django

unread,
Mar 11, 2021, 6:52:24 AM3/11/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:12>

Django

unread,
Mar 12, 2021, 4:35:23 AM3/12/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
------------------------------+-----------------------------------------
Reporter: Adam Johnson | Owner: Manav Agarwal
Type: New feature | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"b1cb923883829b8e2d3d550ba125e574979d8230" b1cb9238]:
{{{
#!CommitTicketReference repository=""
revision="b1cb923883829b8e2d3d550ba125e574979d8230"
Refs #31516, Refs #31703 -- Made makemigrations always name initial
migrations "initial".
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:13>

Django

unread,
Mar 12, 2021, 5:59:11 AM3/12/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Manav
Type: | Agarwal
Cleanup/optimization | Status: assigned

Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

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

* type: New feature => Cleanup/optimization
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:14>

Django

unread,
Mar 12, 2021, 2:14:06 PM3/12/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Manav
Type: | Agarwal
Cleanup/optimization | Status: assigned
Component: Migrations | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"927fead2f5dd7509541d8b0dc170a07b682cc268" 927fead2]:
{{{
#!CommitTicketReference repository=""
revision="927fead2f5dd7509541d8b0dc170a07b682cc268"
Refs #31516 -- Added Migration.suggest_name() tests for migrations with no
operations.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:15>

Django

unread,
Mar 12, 2021, 2:14:06 PM3/12/21
to django-...@googlegroups.com
#31516: Change automatic migration naming from date-based to operation-based
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Manav
Type: | Agarwal
Cleanup/optimization | Status: closed
Component: Migrations | Version: 3.0
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"99640e24b4c42a9f9b1e02d54aec72c13008276d" 99640e24]:
{{{
#!CommitTicketReference repository=""
revision="99640e24b4c42a9f9b1e02d54aec72c13008276d"
Fixed #31516 -- Improved naming of migrations with multiple operations.

52 gives 60 in total (52 + 5 + 3).

Co-authored-by: Adam Johnson <m...@adamj.eu>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31516#comment:16>

Reply all
Reply to author
Forward
0 new messages