  class Comment(models.Model):
      comment = models.TextField()
  
      # Content-object field
      content_type = models.ForeignKey(ContentType)
      object_pk = models.TextField()
      content_object = GenericForeignKey(ct_field="content_type", fk_field="object_pk")
  
      class Meta:
          ordering = ['id']
 
</s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE) </s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE) </s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE) </s> remove     author = models.ForeignKey(Author, to_field='name', related_name='addresses')
 </s> add     author = models.ForeignKey(Author, models.CASCADE, to_field='name', related_name='addresses') </s> remove             content_type = models.ForeignKey(ContentType)
 </s> add             content_type = models.ForeignKey(ContentType, models.CASCADE)
    content_type = models.ForeignKey(ContentType, models.CASCADE)
  class Comment(models.Model):
      comment = models.TextField()
  
      # Content-object field
    content_type = models.ForeignKey(ContentType, models.CASCADE)
      object_pk = models.TextField()
      content_object = GenericForeignKey(ct_field="content_type", fk_field="object_pk")
  
      class Meta:
          ordering = ['id']
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/prefetch_related/models.py