  
  @python_2_unicode_compatible
  class Ranking(models.Model):
      rank = models.IntegerField()
      author = models.ForeignKey(Author)
  
      class Meta:
          # A complex ordering specification. Should stress the system a bit.
          ordering = ('author__extra__note', 'author__name', 'rank')
  
 
</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     author = models.OneToOneField(Author, parent_link=True)
 </s> add     author = models.OneToOneField(Author, models.CASCADE, parent_link=True) </s> remove     author = models.ForeignKey(Author)
 </s> add     author = models.ForeignKey(Author, 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') </s> remove     y = models.ForeignKey('LoopY')
 </s> add     y = models.ForeignKey('LoopY', models.CASCADE)
    author = models.ForeignKey(Author, models.CASCADE)
  
  @python_2_unicode_compatible
  class Ranking(models.Model):
      rank = models.IntegerField()
    author = models.ForeignKey(Author, models.CASCADE)
  
      class Meta:
          # A complex ordering specification. Should stress the system a bit.
          ordering = ('author__extra__note', 'author__name', 'rank')
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/queries/models.py