  @python_2_unicode_compatible
  class Author(models.Model):
      name = models.CharField(max_length=10)
      num = models.IntegerField(unique=True)
      extra = models.ForeignKey(ExtraInfo)
  
      class Meta:
          ordering = ['name']
  
      def __str__(self):
 
</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     item = models.ForeignKey(Item)
 </s> add     item = models.ForeignKey(Item, models.CASCADE) </s> remove     creator = models.ForeignKey(Author)
    note = models.ForeignKey(Note)
 </s> add     creator = models.ForeignKey(Author, models.CASCADE)
    note = models.ForeignKey(Note, models.CASCADE) </s> remove     reporter = models.ForeignKey(Reporter, null=True)
 </s> add     reporter = models.ForeignKey(Reporter, models.SET_NULL, null=True) </s> remove     parent = models.ForeignKey('self', null=True)
 </s> add     parent = models.ForeignKey('self', models.CASCADE, null=True)
    extra = models.ForeignKey(ExtraInfo, models.CASCADE)
  @python_2_unicode_compatible
  class Author(models.Model):
      name = models.CharField(max_length=10)
      num = models.IntegerField(unique=True)
    extra = models.ForeignKey(ExtraInfo, models.CASCADE)
  
      class Meta:
          ordering = ['name']
  
      def __str__(self):
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/queries/models.py