[Django] #25390: Add support to specify a start migration in squashmigrations

7 views
Skip to first unread message

Django

unread,
Sep 12, 2015, 2:55:00 AM9/12/15
to django-...@googlegroups.com
#25390: Add support to specify a start migration in squashmigrations
-------------------------------------+-------------------------------------
Reporter: MarkusH | Owner:
Type: New | Status: new
feature |
Component: Core | Version: master
(Management commands) |
Severity: Normal | Keywords: 1.9
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 1 | Needs tests: 1
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The `squashmigrations` command currently only supports squashing all
migrations from 0001 to a given input. If a migration in between uses
`RunPython` or `RunSQL` the current `squashmigrations` behavior is
infeasible due to restrictions from those to operations.

`squashmigrations` should provide a way to define the first migration from
which on the migrations are squashed up to the one given.

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

Django

unread,
Sep 12, 2015, 2:55:07 AM9/12/15
to django-...@googlegroups.com
#25390: Add support to specify a start migration in squashmigrations
-------------------------------------+-------------------------------------
Reporter: MarkusH | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: 1.9 | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 1

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

* owner: => MarkusH
* status: new => assigned


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

Django

unread,
Sep 12, 2015, 3:20:42 AM9/12/15
to django-...@googlegroups.com
#25390: Add support to specify a start migration in squashmigrations
-------------------------------------+-------------------------------------
Reporter: MarkusH | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: 1.9 | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_docs: 1 => 0
* has_patch: 0 => 1
* needs_tests: 1 => 0


Comment:

PR: https://github.com/django/django/pull/5277

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

Django

unread,
Sep 12, 2015, 6:46:13 PM9/12/15
to django-...@googlegroups.com
#25390: Add support to specify a start migration in squashmigrations
-------------------------------------+-------------------------------------
Reporter: MarkusH | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: 1.9 | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* stage: Unreviewed => Accepted


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

Django

unread,
Sep 16, 2015, 8:23:02 AM9/16/15
to django-...@googlegroups.com
#25390: Add support to specify a start migration in squashmigrations
-------------------------------------+-------------------------------------
Reporter: MarkusH | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: 1.9 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by timgraham:

Old description:

> The `squashmigrations` command currently only supports squashing all
> migrations from 0001 to a given input. If a migration in between uses
> `RunPython` or `RunSQL` the current `squashmigrations` behavior is
> infeasible due to restrictions from those to operations.
>
> `squashmigrations` should provide a way to define the first migration
> from which on the migrations are squashed up to the one given.

New description:

The `squashmigrations` command currently only supports squashing all
migrations from 0001 to a given input. If a migration in between uses
`RunPython` or `RunSQL` the current `squashmigrations` behavior is

infeasible due to restrictions from those two operations.

`squashmigrations` should provide a way to define the first migration from
which on the migrations are squashed up to the one given.

--

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

Django

unread,
Sep 18, 2015, 10:38:36 AM9/18/15
to django-...@googlegroups.com
#25390: Allow specifying a start migration in squashmigrations
-------------------------------------+-------------------------------------

Reporter: MarkusH | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: 1.9 | 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 timgraham):

* stage: Accepted => Ready for checkin


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

Django

unread,
Sep 19, 2015, 1:27:29 AM9/19/15
to django-...@googlegroups.com
#25390: Allow specifying a start migration in squashmigrations
-------------------------------------+-------------------------------------
Reporter: MarkusH | Owner: MarkusH
Type: New feature | Status: closed

Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution: fixed

Keywords: 1.9 | 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 Markus Holtermann <info@…>):

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


Comment:

In [changeset:"43f2eb7ef327126271a8c70d6fde5713947150a5" 43f2eb7e]:
{{{
#!CommitTicketReference repository=""
revision="43f2eb7ef327126271a8c70d6fde5713947150a5"
Fixed #25390 -- Allowed specifying a start migration in squashmigrations

Thanks Tim Graham for the review.
}}}

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

Reply all
Reply to author
Forward
0 new messages