          with connection.schema_editor() as editor:
              editor.alter_field(Author, old_field, new_field, strict=True)
          # Ensure the field is right afterwards
          columns = self.column_classes(Author)
          self.assertEqual(columns['display_name'][0], "CharField")
          self.assertNotIn("name", columns)
  
      @isolate_apps('schema')
      def test_rename_referenced_field(self):
          class Author(Model):
 
</s> remove         self.assertEqual(columns['author_id'][0], "IntegerField")
 </s> add         self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField']) </s> remove         self.assertEqual(columns['name'][0], "CharField")
 </s> add         self.assertEqual(columns['name'][0], connection.features.introspected_field_types['CharField']) </s> remove         self.assertEqual(columns['tagm2mtest_id'][0], "IntegerField")
 </s> add         self.assertEqual(columns['tagm2mtest_id'][0], connection.features.introspected_field_types['IntegerField']) </s> remove         self.assertEqual(columns['name'][0], "CharField")
 </s> add         self.assertEqual(columns['name'][0], connection.features.introspected_field_types['CharField']) </s> remove         self.assertEqual(columns['author_id'][0], "IntegerField")
 </s> add         self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField'])
        self.assertEqual(columns['display_name'][0], connection.features.introspected_field_types['CharField'])
          with connection.schema_editor() as editor:
              editor.alter_field(Author, old_field, new_field, strict=True)
          # Ensure the field is right afterwards
          columns = self.column_classes(Author)
        self.assertEqual(columns['display_name'][0], connection.features.introspected_field_types['CharField'])
          self.assertNotIn("name", columns)
  
      @isolate_apps('schema')
      def test_rename_referenced_field(self):
          class Author(Model):
keep keep keep keep replace keep keep keep keep keep
 Refs #31630 -- Added CharField and IntegerField to DatabaseFeatures.introspected_field_types.

CockroachDB introspects CharField as TextField and IntegerField as
BigIntegerField. 
tests/schema/tests.py