  # didn't catch the infinite loop.
  
  
  class LoopX(models.Model):
      y = models.ForeignKey('LoopY')
  
      class Meta:
          ordering = ['y']
  
  
 
</s> remove     x1 = models.ForeignKey(X, related_name='y1')
 </s> add     x1 = models.ForeignKey(X, models.CASCADE, related_name='y1') </s> remove     x = models.ForeignKey(LoopX)
 </s> add     x = models.ForeignKey(LoopX, models.CASCADE) </s> remove     y = models.ForeignKey('Y')
 </s> add     y = models.ForeignKey('Y', models.CASCADE) </s> remove     author = models.ForeignKey(Author)
 </s> add     author = models.ForeignKey(Author, models.CASCADE) </s> remove     b = models.ForeignKey(B)
 </s> add     b = models.ForeignKey(B, models.CASCADE)
    y = models.ForeignKey('LoopY', models.CASCADE)
  # didn't catch the infinite loop.
  
  
  class LoopX(models.Model):
    y = models.ForeignKey('LoopY', models.CASCADE)
  
      class Meta:
          ordering = ['y']
  
  
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