mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #33899 -- Fixed migration crash when removing indexed field on SQLite 3.35.5+.
Regression in 702819227fd0cdd9b581cd99e11d1561d51cbeb. Thanks cessor for the report.
This commit is contained in:
parent
fd93db97c7
commit
c0beff2123
4 changed files with 18 additions and 2 deletions
|
@ -813,6 +813,17 @@ class SchemaTests(TransactionTestCase):
|
|||
False,
|
||||
)
|
||||
|
||||
def test_remove_indexed_field(self):
|
||||
with connection.schema_editor() as editor:
|
||||
editor.create_model(AuthorCharFieldWithIndex)
|
||||
with connection.schema_editor() as editor:
|
||||
editor.remove_field(
|
||||
AuthorCharFieldWithIndex,
|
||||
AuthorCharFieldWithIndex._meta.get_field("char_field"),
|
||||
)
|
||||
columns = self.column_classes(AuthorCharFieldWithIndex)
|
||||
self.assertNotIn("char_field", columns)
|
||||
|
||||
def test_alter(self):
|
||||
"""
|
||||
Tests simple altering of fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue