mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[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
			
			
This commit is contained in:
		| @@ -1852,7 +1852,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"), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user