  
  
  class SelfRefParent(models.Model):
      parent_data = models.IntegerField()
      self_data = models.ForeignKey('self', null=True)
  
  
  class SelfRefChild(SelfRefParent):
      child_data = models.IntegerField()
  
 
</s> remove     holder = models.ForeignKey(Holder2)
 </s> add     holder = models.ForeignKey(Holder2, models.CASCADE) </s> remove     related_field = models.ForeignKey(AggregateTestModel, null=True)
 </s> add     related_field = models.ForeignKey(AggregateTestModel, models.SET_NULL, null=True) </s> remove     profile = models.ForeignKey(UserProfile, to_field="user")
 </s> add     profile = models.ForeignKey(UserProfile, models.CASCADE, to_field="user") </s> remove     user = models.ForeignKey(User, to_field="username")
 </s> add     user = models.ForeignKey(User, models.CASCADE, to_field="username") </s> remove     parent = models.ForeignKey('self', null=True)
 </s> add     parent = models.ForeignKey('self', models.CASCADE, null=True)
    self_data = models.ForeignKey('self', models.SET_NULL, null=True)
  
  
  class SelfRefParent(models.Model):
      parent_data = models.IntegerField()
    self_data = models.ForeignKey('self', models.SET_NULL, null=True)
  
  
  class SelfRefChild(SelfRefParent):
      child_data = models.IntegerField()
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/model_inheritance_regress/models.py