mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Fixed #21783: (again) Found second source of bug, also squashed it.
This commit is contained in:
parent
e8d4aed3b9
commit
af4a8478e4
2 changed files with 17 additions and 1 deletions
|
|
@ -184,6 +184,14 @@ class OperationTests(MigrationTestBase):
|
|||
if n == "height"
|
||||
][0]
|
||||
self.assertEqual(field.default, NOT_PROVIDED)
|
||||
# Test the database alteration
|
||||
project_state.render().get_model("test_adflpd", "pony").objects.create(
|
||||
weight = 4,
|
||||
)
|
||||
self.assertColumnNotExists("test_adflpd_pony", "height")
|
||||
with connection.schema_editor() as editor:
|
||||
operation.database_forwards("test_adflpd", editor, project_state, new_state)
|
||||
self.assertColumnExists("test_adflpd_pony", "height")
|
||||
|
||||
def test_add_field_m2m(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue