  
  
  class SelfRefFK(models.Model):
      name = models.CharField(max_length=50)
      parent = models.ForeignKey('self', null=True, blank=True, related_name='children')
 
</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', blank=True, null=True,
            related_name='children')
    category = models.ForeignKey(NamedCategory, null=True, default=None)
 </s> add     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) </s> remove     parent = models.ForeignKey('self', null=True, blank=True)
 </s> add     parent = models.ForeignKey('self', models.SET_NULL, null=True, blank=True) </s> remove     parent = models.ForeignKey('self', to_field='barcode', blank=True, null=True)
 </s> add     parent = models.ForeignKey('self', models.SET_NULL, to_field='barcode', blank=True, null=True) </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')
    parent = models.ForeignKey('self', models.SET_NULL, null=True, blank=True, related_name='children')
  
  
  class SelfRefFK(models.Model):
      name = models.CharField(max_length=50)
    parent = models.ForeignKey('self', models.SET_NULL, null=True, blank=True, related_name='children')
keep keep keep keep replace
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/aggregation_regress/models.py