diff options
| author | Markus Holtermann <info@markusholtermann.eu> | 2014-11-20 17:08:04 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-11-20 14:44:05 -0500 |
| commit | 145467a63688eb9055d176d84655cc029060da30 (patch) | |
| tree | 6fc58f13ea021a4423b220347f924feb56dcc03a /tests | |
| parent | 01f2cf2aecc932d43b20b55fc19a8fa440457b5f (diff) | |
[1.7.x] Fixed duplicate index error on Oracle; refs #23859.
Refers to regression introduced in 7b4a994599b75a07cb07d1e0cc26b3bbf25ab7a6
Backport of 4c709cc0ef0daa2b527e056865f51796fb0d42f3 from master
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/migrations/test_operations.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index e44c3a7931..dead760d5c 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -80,7 +80,7 @@ class OperationTestBase(MigrationTestBase): # Make the "current" state model_options = { "swappable": "TEST_SWAP_MODEL", - "index_together": [["pink", "weight"]] if index_together else [], + "index_together": [["weight", "pink"]] if index_together else [], "unique_together": [["pink", "weight"]] if unique_together else [], } if options: @@ -1011,11 +1011,17 @@ class OperationTests(OperationTestBase): with atomic(): cursor.execute("INSERT INTO test_rnfl_pony (blue, weight) VALUES (1, 1)") cursor.execute("DELETE FROM test_rnfl_pony") + # Ensure the index constraint has been ported over + # TODO: Uncomment assert when #23880 is fixed + # self.assertIndexExists("test_rnfl_pony", ["weight", "blue"]) # And test reversal with connection.schema_editor() as editor: operation.database_backwards("test_rnfl", editor, new_state, project_state) self.assertColumnExists("test_rnfl_pony", "pink") self.assertColumnNotExists("test_rnfl_pony", "blue") + # Ensure the index constraint has been reset + # TODO: Uncomment assert when #23880 is fixed + # self.assertIndexExists("test_rnfl_pony", ["weight", "pink"]) def test_alter_unique_together(self): """ |
