mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #33953 -- Fixed test_rename_model_with_db_table_rename_m2m() crash on SQLite < 3.20.
This commit is contained in:
parent
4483a9b12f
commit
a9e7beb959
@ -1080,12 +1080,12 @@ class OperationTests(OperationTestBase):
|
||||
),
|
||||
],
|
||||
)
|
||||
new_state = project_state.clone()
|
||||
operation = migrations.RenameModel("Pony", "PinkPony")
|
||||
operation.state_forwards(app_label, new_state)
|
||||
with connection.schema_editor() as editor:
|
||||
operation.database_forwards(app_label, editor, project_state, new_state)
|
||||
|
||||
new_state = self.apply_operations(
|
||||
app_label,
|
||||
project_state,
|
||||
operations=[migrations.RenameModel("Pony", "PinkPony")],
|
||||
atomic=connection.features.supports_atomic_references_rename,
|
||||
)
|
||||
Pony = new_state.apps.get_model(app_label, "PinkPony")
|
||||
Rider = new_state.apps.get_model(app_label, "Rider")
|
||||
pony = Pony.objects.create()
|
||||
|
Loading…
Reference in New Issue
Block a user