  
  
  class Room(models.Model):
      name = models.CharField(max_length=50)
      house = models.ForeignKey(House, related_name='rooms')
  
      class Meta:
          ordering = ['id']
  
  
 
</s> remove     owner = models.ForeignKey('Person', null=True)
    main_room = models.OneToOneField('Room', related_name='main_room_of', null=True)
 </s> add     owner = models.ForeignKey('Person', models.SET_NULL, null=True)
    main_room = models.OneToOneField('Room', models.SET_NULL, related_name='main_room_of', null=True) </s> remove     author = models.ForeignKey(Author, to_field='name', related_name='addresses')
 </s> add     author = models.ForeignKey(Author, models.CASCADE, to_field='name', related_name='addresses') </s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE) </s> remove     item = models.ForeignKey(Item)
 </s> add     item = models.ForeignKey(Item, models.CASCADE) </s> remove     author = models.ForeignKey(Author, to_field='name', related_name='i_like')
    likes_author = models.ForeignKey(Author, to_field='name', related_name='likes_me')
 </s> add     author = models.ForeignKey(Author, models.CASCADE, to_field='name', related_name='i_like')
    likes_author = models.ForeignKey(Author, models.CASCADE, to_field='name', related_name='likes_me')
    house = models.ForeignKey(House, models.CASCADE, related_name='rooms')
  
  
  class Room(models.Model):
      name = models.CharField(max_length=50)
    house = models.ForeignKey(House, models.CASCADE, related_name='rooms')
  
      class Meta:
          ordering = ['id']
  
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/prefetch_related/models.py