mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +00:00
[1.7.x] Fixed #22248 -- Made RenameModel reversible
Backport of cf7a2a000e from master
This commit is contained in:
committed by
Tim Graham
parent
dfcac7d7f5
commit
50434aebe2
@@ -433,8 +433,7 @@ class OperationTests(OperationTestBase):
|
||||
self.assertFKNotExists("test_rnmo_rider", ["pony_id"], ("test_rnmo_pony", "id"))
|
||||
self.assertFKExists("test_rnmo_rider", ["pony_id"], ("test_rnmo_horse", "id"))
|
||||
# And test reversal
|
||||
with connection.schema_editor() as editor:
|
||||
operation.database_backwards("test_rnmo", editor, new_state, project_state)
|
||||
self.unapply_operations("test_rnmo", project_state, [operation])
|
||||
self.assertTableExists("test_rnmo_pony")
|
||||
self.assertTableNotExists("test_rnmo_horse")
|
||||
if connection.features.supports_foreign_keys:
|
||||
|
||||
Reference in New Issue
Block a user