diff options
author | Shai Berger <shai@platonix.com> | 2015-12-10 02:12:04 +0200 |
---|---|---|
committer | Shai Berger <shai@platonix.com> | 2015-12-10 02:12:04 +0200 |
commit | c8b3fbe21b09937b57e96dbddcc71946da246a2f (patch) | |
tree | c603ae87b701e3379db48c5c8ea52aec1bfe7ecd /tests/migrations/test_operations.py | |
parent | 179fbab7e05946b59ec9815d6e9b1901826ed610 (diff) | |
download | django-c8b3fbe21b09937b57e96dbddcc71946da246a2f.tar.gz |
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.
Diffstat (limited to 'tests/migrations/test_operations.py')
-rw-r--r-- | tests/migrations/test_operations.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index 7118996ff7..51d4d5bbbb 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -1867,7 +1867,10 @@ class OperationTests(OperationTestBase): ), migrations.CreateModel( "ILoveMorePonies", - [("id", models.AutoField(primary_key=True))], + # We use IntegerField and not AutoField because + # the model is going to be deleted immediately + # and with an AutoField this fails on Oracle + [("id", models.IntegerField(primary_key=True))], options={"db_table": "ilovemoreponies"}, ), migrations.DeleteModel("ILoveMorePonies"), |