mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[4.1.x] Fixed #33899 -- Fixed migration crash when removing indexed field on SQLite 3.35.5+.
Regression in 702819227fd0cdd9b581cd99e11d1561d51cbeb.
Thanks cessor for the report.
Backport of c0beff2123 from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
d9ace347b4
commit
f546e7c18b
@@ -810,6 +810,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
|
||||
|
||||
Reference in New Issue
Block a user