  
  class ChildModel2(models.Model):
      my_own_pk = models.CharField(max_length=100, primary_key=True)
      name = models.CharField(max_length=100)
      parent = models.ForeignKey(ParentModelWithCustomPk)
  
      def get_absolute_url(self):
          return '/child_model2/'
  
  
 
</s> remove     parent = models.ForeignKey(ParentModelWithCustomPk)
 </s> add     parent = models.ForeignKey(ParentModelWithCustomPk, models.CASCADE) </s> remove     state = models.ForeignKey(State)
 </s> add     state = models.ForeignKey(State, models.CASCADE) </s> remove     city = models.ForeignKey(City)
 </s> add     city = models.ForeignKey(City, models.CASCADE) </s> remove     parent = models.ForeignKey(UUIDPKParent)
 </s> add     parent = models.ForeignKey(UUIDPKParent, models.CASCADE) </s> remove     parent = models.ForeignKey(UUIDPKParent)
 </s> add     parent = models.ForeignKey(UUIDPKParent, models.CASCADE)
    parent = models.ForeignKey(ParentModelWithCustomPk, models.CASCADE)
  
  class ChildModel2(models.Model):
      my_own_pk = models.CharField(max_length=100, primary_key=True)
      name = models.CharField(max_length=100)
    parent = models.ForeignKey(ParentModelWithCustomPk, models.CASCADE)
  
      def get_absolute_url(self):
          return '/child_model2/'
  
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/admin_inlines/models.py