diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/schema/tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py index 0702b54135..a72e6906bb 100644 --- a/tests/schema/tests.py +++ b/tests/schema/tests.py @@ -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 |
