              # There would be a clash if Model.field installed an accessor.
              model = models.IntegerField()
  
          class Model(models.Model):
              field = models.ForeignKey(Target, related_name='+')
  
          field = Model._meta.get_field('field')
          errors = field.check()
          self.assertEqual(errors, [])
  
 
</s> remove             f = models.ForeignKey(Target)
 </s> add             f = models.ForeignKey(Target, models.CASCADE) </s> remove             fk = models.ForeignKey(Target)
 </s> add             fk = models.ForeignKey(Target, models.CASCADE) </s> remove             content_type = models.ForeignKey(ContentType)
 </s> add             content_type = models.ForeignKey(ContentType, models.CASCADE) </s> remove     x1 = models.ForeignKey(X, related_name='y1')
 </s> add     x1 = models.ForeignKey(X, models.CASCADE, related_name='y1') </s> remove             content_type = models.ForeignKey(ContentType)
 </s> add             content_type = models.ForeignKey(ContentType, models.CASCADE)
            field = models.ForeignKey(Target, models.CASCADE, related_name='+')
              # There would be a clash if Model.field installed an accessor.
              model = models.IntegerField()
  
          class Model(models.Model):
            field = models.ForeignKey(Target, models.CASCADE, related_name='+')
  
          field = Model._meta.get_field('field')
          errors = field.check()
          self.assertEqual(errors, [])
  
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_relative_fields.py