[Django] #25896: SeparateDatabaseAndState database_backwards is broken.

4 views
Skip to first unread message

Django

unread,
Dec 8, 2015, 12:10:04 PM12/8/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState database_backwards is broken.
----------------------------+---------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------+---------------------
When there are various database ops in SeparateDatabaseAndState, and they
depend on each other, database_backwards is broken because it applies
states incorrectly.
The code exists unchanged in 1.9 and master.
Test coverage for SeparateDatabaseAndState was incomplete anyway, added a
more thorough test which breaks, and the bug fix.

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

Django

unread,
Dec 8, 2015, 12:10:29 PM12/8/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState database_backwards is broken.
----------------------------+--------------------------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: assigned
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


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

Django

unread,
Dec 8, 2015, 1:13:17 PM12/8/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState.database_backwards() applies state incorrectly
----------------------------+------------------------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: assigned
Component: Migrations | Version: 1.8
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 timgraham):

* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted


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

Django

unread,
Dec 9, 2015, 11:08:09 AM12/9/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState.database_backwards() applies state incorrectly
----------------------------+------------------------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: closed
Component: Migrations | Version: 1.8
Severity: Normal | Resolution: fixed

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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"542b7f6c50df18f2aa201cf1de81577c1bee643c" 542b7f6c]:
{{{
#!CommitTicketReference repository=""
revision="542b7f6c50df18f2aa201cf1de81577c1bee643c"
Fixed #25896 -- Fixed state bug in
SeparateDatabaseAndState.database_backwards().
}}}

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

Django

unread,
Dec 9, 2015, 11:14:22 AM12/9/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState.database_backwards() applies state incorrectly
----------------------------+------------------------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: closed
Component: Migrations | Version: 1.8

Severity: Normal | Resolution: fixed
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 Tim Graham <timograham@…>):

In [changeset:"0772bffd4a2feac3928924a8427f372ab3ec6919" 0772bffd]:
{{{
#!CommitTicketReference repository=""
revision="0772bffd4a2feac3928924a8427f372ab3ec6919"
[1.8.x] Fixed #25896 -- Fixed state bug in
SeparateDatabaseAndState.database_backwards().

Backport of 542b7f6c50df18f2aa201cf1de81577c1bee643c from master
}}}

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

Django

unread,
Dec 9, 2015, 11:14:30 AM12/9/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState.database_backwards() applies state incorrectly
----------------------------+------------------------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: closed
Component: Migrations | Version: 1.8

Severity: Normal | Resolution: fixed
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 Tim Graham <timograham@…>):

In [changeset:"f076cf07effe54af8a28f22431c3c76a8af61fc5" f076cf07]:
{{{
#!CommitTicketReference repository=""
revision="f076cf07effe54af8a28f22431c3c76a8af61fc5"
[1.9.x] Fixed #25896 -- Fixed state bug in
SeparateDatabaseAndState.database_backwards().

Backport of 542b7f6c50df18f2aa201cf1de81577c1bee643c from master
}}}

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

Django

unread,
Dec 9, 2015, 7:17:05 PM12/9/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState.database_backwards() applies state incorrectly
----------------------------+------------------------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: closed
Component: Migrations | Version: 1.8

Severity: Normal | Resolution: fixed
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 Shai Berger <shai@…>):

In [changeset:"c8b3fbe21b09937b57e96dbddcc71946da246a2f" c8b3fbe2]:
{{{
#!CommitTicketReference repository=""
revision="c8b3fbe21b09937b57e96dbddcc71946da246a2f"
Refs #25896 -- Fixed migration test failure on Oracle

The test creates and deletes a model in the same migration, and the model
had an AutoField. On Oracle, AutoField's are set up using deferred SQL,
which
in this case was trying to modify a table after it had dbeen removed.
}}}

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

Django

unread,
Dec 9, 2015, 7:21:28 PM12/9/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState.database_backwards() applies state incorrectly
----------------------------+------------------------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: closed
Component: Migrations | Version: 1.8

Severity: Normal | Resolution: fixed
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 Shai Berger <shai@…>):

In [changeset:"f1964bc7e2a1be675ed19ab302362311df67e3eb" f1964bc]:
{{{
#!CommitTicketReference repository=""
revision="f1964bc7e2a1be675ed19ab302362311df67e3eb"
[1.9.x] Refs #25896 -- Fixed migration test failure on Oracle

The test creates and deletes a model in the same migration, and the model
had an AutoField. On Oracle, AutoField's are set up using deferred SQL,
which
in this case was trying to modify a table after it had dbeen removed.

Backport of c8b3fbe from master
}}}

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

Django

unread,
Dec 9, 2015, 7:23:37 PM12/9/15
to django-...@googlegroups.com
#25896: SeparateDatabaseAndState.database_backwards() applies state incorrectly
----------------------------+------------------------------------
Reporter: amosonn | Owner: amosonn
Type: Bug | Status: closed
Component: Migrations | Version: 1.8

Severity: Normal | Resolution: fixed
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 Shai Berger <shai@…>):

In [changeset:"02c049ab1ab5273d4212890635f94cc7eac7b158" 02c049ab]:
{{{
#!CommitTicketReference repository=""
revision="02c049ab1ab5273d4212890635f94cc7eac7b158"
[1.8.x] Refs #25896 -- Fixed migration test failure on Oracle

The test creates and deletes a model in the same migration, and the model
had an AutoField. On Oracle, AutoField's are set up using deferred SQL,
which
in this case was trying to modify a table after it had dbeen removed.

Backport of c8b3fbe from master
}}}

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

Reply all
Reply to author
Forward
0 new messages