  @python_2_unicode_compatible
  class RestrictedModel(models.Model):
      name = models.CharField(max_length=50)
      is_public = models.BooleanField(default=False)
      related = models.ForeignKey(RelatedModel)
  
      objects = RestrictedManager()
      plain_manager = models.Manager()
  
      def __str__(self):
 
</s> remove     related = models.OneToOneField(RelatedModel)
 </s> add     related = models.OneToOneField(RelatedModel, models.CASCADE) </s> remove     related = models.ForeignKey(Secondary)
 </s> add     related = models.ForeignKey(Secondary, models.CASCADE) </s> remove     tag = models.ForeignKey(Tag)
 </s> add     tag = models.ForeignKey(Tag, models.CASCADE) </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     chef = models.ForeignKey(Chef, null=True, blank=True)
 </s> add     chef = models.ForeignKey(Chef, models.SET_NULL, null=True, blank=True)
    related = models.ForeignKey(RelatedModel, models.CASCADE)
  @python_2_unicode_compatible
  class RestrictedModel(models.Model):
      name = models.CharField(max_length=50)
      is_public = models.BooleanField(default=False)
    related = models.ForeignKey(RelatedModel, models.CASCADE)
  
      objects = RestrictedManager()
      plain_manager = models.Manager()
  
      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/custom_managers/models.py