  
  @python_2_unicode_compatible
  class Count(models.Model):
      num = models.PositiveSmallIntegerField()
      parent = models.ForeignKey('self', null=True)
  
      def __str__(self):
          return six.text_type(self.num)
  
  
 
</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     reporter = models.ForeignKey(Reporter)
    response_to = models.ForeignKey('self', null=True)
 </s> add     reporter = models.ForeignKey(Reporter, models.CASCADE)
    response_to = models.ForeignKey('self', models.SET_NULL, null=True) </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)
    parent = models.ForeignKey('self', models.CASCADE, null=True)
  
  @python_2_unicode_compatible
  class Count(models.Model):
      num = models.PositiveSmallIntegerField()
    parent = models.ForeignKey('self', models.CASCADE, null=True)
  
      def __str__(self):
          return six.text_type(self.num)
  
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/admin_utils/models.py