  
  @python_2_unicode_compatible
  class Tag(models.Model):
      name = models.CharField(max_length=10)
      parent = models.ForeignKey('self', blank=True, null=True,
              related_name='children')
      category = models.ForeignKey(NamedCategory, null=True, default=None)
  
      class Meta:
          ordering = ['name']
  
      def __str__(self):
 
</s> remove     parent = models.ForeignKey('self', null=True, blank=True, related_name='children')
 </s> add     parent = models.ForeignKey('self', models.SET_NULL, null=True, blank=True, related_name='children') </s> remove     extra = models.ForeignKey(ExtraInfo)
 </s> add     extra = models.ForeignKey(ExtraInfo, models.CASCADE) </s> remove     boss = models.ForeignKey('self', null=True,
                             related_name='serfs')
 </s> add     boss = models.ForeignKey('self', models.SET_NULL, null=True, related_name='serfs') </s> remove     alfa = models.ForeignKey(Alfa, null=True)
    bravo = models.ForeignKey(Bravo, null=True)
 </s> add     alfa = models.ForeignKey(Alfa, models.SET_NULL, null=True)
    bravo = models.ForeignKey(Bravo, models.SET_NULL, null=True) </s> remove     parent = models.ForeignKey('self', null=True, blank=True)
 </s> add     parent = models.ForeignKey('self', models.SET_NULL, null=True, blank=True)
    parent = models.ForeignKey(
        'self',
        models.SET_NULL,
        blank=True, null=True,
        related_name='children',
    )
    category = models.ForeignKey(NamedCategory, models.SET_NULL, null=True, default=None)
  
  @python_2_unicode_compatible
  class Tag(models.Model):
      name = models.CharField(max_length=10)
    parent = models.ForeignKey(
        'self',
        models.SET_NULL,
        blank=True, null=True,
        related_name='children',
    )
    category = models.ForeignKey(NamedCategory, models.SET_NULL, null=True, default=None)
    parent = models.ForeignKey(
        'self',
        models.SET_NULL,
        blank=True, null=True,
        related_name='children',
    )
    category = models.ForeignKey(NamedCategory, models.SET_NULL, null=True, default=None)
    parent = models.ForeignKey(
        'self',
        models.SET_NULL,
        blank=True, null=True,
        related_name='children',
    )
    category = models.ForeignKey(NamedCategory, models.SET_NULL, null=True, default=None)
  
      class Meta:
          ordering = ['name']
  
      def __str__(self):
keep keep keep keep replace replace replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/queries/models.py