          class Parent(models.Model):
              pass
  
          class Child(models.Model):
              parent = models.ForeignKey(Parent)
  
              class Meta:
                  ordering = ("parent_id",)
  
          self.assertFalse(Child.check())
 
</s> remove             question = models.ForeignKey(Question)
 </s> add             question = models.ForeignKey(Question, models.CASCADE) </s> remove     person = models.OneToOneField(Member, primary_key=True)
    parent = models.ForeignKey(Member, related_name="children")
 </s> add     person = models.OneToOneField(Member, models.CASCADE, primary_key=True)
    parent = models.ForeignKey(Member, models.CASCADE, related_name="children") </s> remove     parent = models.ForeignKey(Parent, editable=False, null=True)
 </s> add     parent = models.ForeignKey(Parent, models.SET_NULL, editable=False, null=True) </s> remove     b = models.ForeignKey(B)
 </s> add     b = models.ForeignKey(B, models.CASCADE) </s> remove     z = models.ForeignKey('self')
 </s> add     z = models.ForeignKey('self', models.CASCADE)
            parent = models.ForeignKey(Parent, models.CASCADE)
          class Parent(models.Model):
              pass
  
          class Child(models.Model):
            parent = models.ForeignKey(Parent, models.CASCADE)
  
              class Meta:
                  ordering = ("parent_id",)
  
          self.assertFalse(Child.check())
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/invalid_models_tests/test_models.py