  
  class UUIDPKChild(models.Model):
      uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
      name = models.CharField(max_length=255)
      parent = models.ForeignKey(UUIDPKParent)
  
  
  class ChildWithEditablePK(models.Model):
      name = models.CharField(max_length=255, primary_key=True)
      parent = models.ForeignKey(UUIDPKParent)
 
</s> remove     parent = models.ForeignKey(UUIDPKParent)
 </s> add     parent = models.ForeignKey(UUIDPKParent, models.CASCADE) </s> remove     parent = models.ForeignKey(AutoPKParent)
 </s> add     parent = models.ForeignKey(AutoPKParent, models.CASCADE) </s> remove     parent = models.ForeignKey(UUIDPKParent)
 </s> add     parent = models.ForeignKey(UUIDPKParent, models.CASCADE) </s> remove     parent = models.ForeignKey('self')
 </s> add     parent = models.ForeignKey('self', models.CASCADE) </s> remove     parent = models.ForeignKey(to=ParentWithUUIDAlternateKey, to_field='uuid')
 </s> add     parent = models.ForeignKey(ParentWithUUIDAlternateKey, models.CASCADE, to_field='uuid')
    parent = models.ForeignKey(UUIDPKParent, models.CASCADE)
  
  class UUIDPKChild(models.Model):
      uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
      name = models.CharField(max_length=255)
    parent = models.ForeignKey(UUIDPKParent, models.CASCADE)
  
  
  class ChildWithEditablePK(models.Model):
      name = models.CharField(max_length=255, primary_key=True)
      parent = models.ForeignKey(UUIDPKParent)
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/model_formsets/models.py