Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25896 closed Bug (fixed)

SeparateDatabaseAndState.database_backwards() applies state incorrectly

Reported by: Amos Onn Owned by: Amos Onn
Component: Migrations Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

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.

Change History (8)

comment:1 by Amos Onn, 9 years ago

Status: newassigned

comment:2 by Tim Graham, 9 years ago

Patch needs improvement: set
Summary: SeparateDatabaseAndState database_backwards is broken.SeparateDatabaseAndState.database_backwards() applies state incorrectly
Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 542b7f6c:

Fixed #25896 -- Fixed state bug in SeparateDatabaseAndState.database_backwards().

comment:4 by Tim Graham <timograham@…>, 9 years ago

In 0772bffd:

[1.8.x] Fixed #25896 -- Fixed state bug in SeparateDatabaseAndState.database_backwards().

Backport of 542b7f6c50df18f2aa201cf1de81577c1bee643c from master

comment:5 by Tim Graham <timograham@…>, 9 years ago

In f076cf07:

[1.9.x] Fixed #25896 -- Fixed state bug in SeparateDatabaseAndState.database_backwards().

Backport of 542b7f6c50df18f2aa201cf1de81577c1bee643c from master

comment:6 by Shai Berger <shai@…>, 9 years ago

In c8b3fbe2:

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.

comment:7 by Shai Berger <shai@…>, 9 years ago

In f1964bc:

[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

comment:8 by Shai Berger <shai@…>, 9 years ago

In 02c049ab:

[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

Note: See TracTickets for help on using tickets.
Back to Top