      name = models.CharField(max_length=100)
  
  
  class City(models.Model):
      state = models.ForeignKey(State)
      name = models.CharField(max_length=100)
  
      def get_absolute_url(self):
          return '/dummy/%s/' % self.pk
  
 
</s> remove     city = models.ForeignKey(City)
 </s> add     city = models.ForeignKey(City, models.CASCADE) </s> remove     state = models.ForeignKey(State)
 </s> add     state = models.ForeignKey(State, models.CASCADE) </s> remove     work_at = models.ForeignKey(Restaurant)
 </s> add     work_at = models.ForeignKey(Restaurant, models.CASCADE) </s> remove     parent = models.ForeignKey(ParentModelWithCustomPk)
 </s> add     parent = models.ForeignKey(ParentModelWithCustomPk, models.CASCADE) </s> remove     parent = models.ForeignKey(ParentModelWithCustomPk)
 </s> add     parent = models.ForeignKey(ParentModelWithCustomPk, models.CASCADE)
    state = models.ForeignKey(State, models.CASCADE)
      name = models.CharField(max_length=100)
  
  
  class City(models.Model):
    state = models.ForeignKey(State, models.CASCADE)
      name = models.CharField(max_length=100)
  
      def get_absolute_url(self):
          return '/dummy/%s/' % self.pk
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/admin_views/models.py