      data = models.IntegerField()
  
  
  class UserProfile(models.Model):
      user = models.ForeignKey(User, unique=True, to_field="username")
      about = models.TextField()
  
  
  class ProfileNetwork(models.Model):
      profile = models.ForeignKey(UserProfile, to_field="user")
 
</s> remove     user = models.ForeignKey(User, to_field="username")
 </s> add     user = models.ForeignKey(User, models.CASCADE, to_field="username") </s> remove     profile = models.ForeignKey(UserProfile, to_field="user")
 </s> add     profile = models.ForeignKey(UserProfile, models.CASCADE, to_field="user") </s> remove     owner = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL)
 </s> add     owner = models.ForeignKey(User, models.SET_NULL, null=True, blank=True) </s> remove     user = models.OneToOneField(User, primary_key=True)
 </s> add     user = models.OneToOneField(User, models.CASCADE, primary_key=True) </s> remove     person = models.ForeignKey(Person, primary_key=True)
 </s> add     person = models.ForeignKey(Person, models.CASCADE, primary_key=True)
    user = models.ForeignKey(User, models.CASCADE, unique=True, to_field="username")
      data = models.IntegerField()
  
  
  class UserProfile(models.Model):
    user = models.ForeignKey(User, models.CASCADE, unique=True, to_field="username")
      about = models.TextField()
  
  
  class ProfileNetwork(models.Model):
      profile = models.ForeignKey(UserProfile, to_field="user")
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/model_formsets_regress/models.py