      created_by_ct = models.ForeignKey(ContentType, null=True,
                                        related_name='taggeditem_set3')
      created_by_fkey = models.PositiveIntegerField(null=True)
      created_by = GenericForeignKey('created_by_ct', 'created_by_fkey',)
      favorite_ct = models.ForeignKey(ContentType, null=True,
                                      related_name='taggeditem_set4')
      favorite_fkey = models.CharField(max_length=64, null=True)
      favorite = GenericForeignKey('favorite_ct', 'favorite_fkey')
  
      def __str__(self):
          return self.tag
 
</s> remove     created_by_ct = models.ForeignKey(ContentType, null=True,
                                      related_name='taggeditem_set3')
 </s> add     created_by_ct = models.ForeignKey(
        ContentType,
        models.SET_NULL,
        null=True,
        related_name='taggeditem_set3',
    ) </s> remove     content_type = models.ForeignKey(ContentType, related_name="taggeditem_set2")
 </s> add     content_type = models.ForeignKey(
        ContentType,
        models.CASCADE,
        related_name="taggeditem_set2",
    ) </s> remove     content_type = models.ForeignKey(ContentType, related_name='tagged_items')
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE, related_name='tagged_items') </s> remove             content_type = models.ForeignKey(ContentType, null=True)
 </s> add             content_type = models.ForeignKey(ContentType, models.SET_NULL, null=True) </s> remove     section = models.ForeignKey(Section, null=True, blank=True)
    sub_section = models.ForeignKey(Section, null=True, blank=True, on_delete=models.SET_NULL, related_name='+')
 </s> add     section = models.ForeignKey(Section, models.CASCADE, null=True, blank=True)
    sub_section = models.ForeignKey(Section, models.SET_NULL, null=True, blank=True, related_name='+')
    favorite_ct = models.ForeignKey(
        ContentType,
        models.SET_NULL,
        null=True,
        related_name='taggeditem_set4',
    )
      created_by_ct = models.ForeignKey(ContentType, null=True,
                                        related_name='taggeditem_set3')
      created_by_fkey = models.PositiveIntegerField(null=True)
      created_by = GenericForeignKey('created_by_ct', 'created_by_fkey',)
    favorite_ct = models.ForeignKey(
        ContentType,
        models.SET_NULL,
        null=True,
        related_name='taggeditem_set4',
    )
    favorite_ct = models.ForeignKey(
        ContentType,
        models.SET_NULL,
        null=True,
        related_name='taggeditem_set4',
    )
      favorite_fkey = models.CharField(max_length=64, null=True)
      favorite = GenericForeignKey('favorite_ct', 'favorite_fkey')
  
      def __str__(self):
          return self.tag
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/prefetch_related/models.py