(self)
| 4998 | |
| 4999 | @skipUnlessDBFeature("supports_comments") |
| 5000 | def test_add_db_comment_charfield(self): |
| 5001 | comment = "Custom comment" |
| 5002 | field = CharField(max_length=255, db_comment=comment) |
| 5003 | field.set_attributes_from_name("name_with_comment") |
| 5004 | with connection.schema_editor() as editor: |
| 5005 | editor.create_model(Author) |
| 5006 | editor.add_field(Author, field) |
| 5007 | self.assertEqual( |
| 5008 | self.get_column_comment(Author._meta.db_table, "name_with_comment"), |
| 5009 | comment, |
| 5010 | ) |
| 5011 | |
| 5012 | @skipUnlessDBFeature("supports_comments", "supports_stored_generated_columns") |
| 5013 | def test_add_db_comment_generated_field(self): |
nothing calls this directly
no test coverage detected