[Django] #24729: Test --keepdb option is incompatible with data migrations.

21 views
Skip to first unread message

Django

unread,
Apr 29, 2015, 5:10:22 PM4/29/15
to django-...@googlegroups.com
#24729: Test --keepdb option is incompatible with data migrations.
----------------------------------------------+--------------------
Reporter: acoady | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer (models, ORM) | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
In 1.8 only, the test db is flushed before running migrations. But when
using --keepdb the migrations won't be run, therefore any app which has
data migrations will effectively be broken. For most non-trivial apps,
their test setups won't even run.

In 1.9, this issue is already handled because the flushing the test db has
been removed anyway.

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

Django

unread,
Apr 29, 2015, 5:35:35 PM4/29/15
to django-...@googlegroups.com
#24729: Test --keepdb option is incompatible with data migrations.
-------------------------------------+-------------------------------------

Reporter: acoady | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Old description:

> In 1.8 only, the test db is flushed before running migrations. But when
> using --keepdb the migrations won't be run, therefore any app which has
> data migrations will effectively be broken. For most non-trivial apps,
> their test setups won't even run.
>
> In 1.9, this issue is already handled because the flushing the test db
> has been removed anyway.

New description:

In 1.8 only, the test db is flushed before running migrations. But when
using --keepdb the migrations won't be run, therefore any app which has
data migrations will effectively be broken. For most non-trivial apps,
their test setups won't even run.

In 1.9, this issue is already handled because flushing the test db has
been removed anyway.

https://github.com/django/django/pull/4582

--

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

Django

unread,
Apr 30, 2015, 9:35:20 AM4/30/15
to django-...@googlegroups.com
#24729: Test --keepdb option is incompatible with data migrations.
-------------------------------------+-------------------------------------
Reporter: acoady | Owner: nobody
Type: Bug | Status: new

Component: Database layer | Version: 1.8
(models, ORM) |
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 timgraham):

* has_patch: 0 => 1
* type: Uncategorized => Bug
* stage: Unreviewed => Ready for checkin


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

Django

unread,
Apr 30, 2015, 9:51:26 AM4/30/15
to django-...@googlegroups.com
#24729: Test --keepdb option is incompatible with data migrations.
-------------------------------------+-------------------------------------
Reporter: acoady | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 1.8
(models, ORM) |
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"6b05d3a2e34229bf97e0a0dad81c09fa572591ff" 6b05d3a]:
{{{
#!CommitTicketReference repository=""
revision="6b05d3a2e34229bf97e0a0dad81c09fa572591ff"
[1.8.x] Fixed #24729 -- Removed test db flush when using --keepdb.
}}}

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

Django

unread,
Nov 13, 2016, 5:23:50 PM11/13/16
to django-...@googlegroups.com
#24729: Test --keepdb option is incompatible with data migrations.
-------------------------------------+-------------------------------------
Reporter: acoady | Owner: nobody

Type: Bug | Status: closed
Component: Database layer | Version: 1.8
(models, ORM) |
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
-------------------------------------+-------------------------------------

Comment (by Sam Thompson):

This appears to also be broken in 1.9 (1.9.6 in my case). Investigating
further before opening a new ticket.

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

Reply all
Reply to author
Forward
0 new messages