  
  
  class Book(SimpleModel):
      title = models.CharField(max_length=100)
      author = models.ForeignKey(Author, related_name='books', null=True)
  
  
  class Event(SimpleModel):
      name = models.CharField(max_length=100)
      when = models.DateTimeField()
 
</s> remove     author = models.ForeignKey(Author, unique=True)
 </s> add     author = models.ForeignKey(Author, models.CASCADE, unique=True) </s> remove     author = models.ForeignKey(Author)
 </s> add     author = models.ForeignKey(Author, models.CASCADE) </s> remove     author = models.ForeignKey(Author)
 </s> add     author = models.ForeignKey(Author, models.CASCADE) </s> remove         author = models.ForeignKey(Author)
 </s> add         author = models.ForeignKey(Author, on_delete=models.CASCADE) </s> remove     publisher = models.ForeignKey(Publisher, related_name='books', db_column="publisher_id_column")
 </s> add     publisher = models.ForeignKey(
        Publisher,
        models.CASCADE,
        related_name='books',
        db_column="publisher_id_column",
    )
    author = models.ForeignKey(Author, models.SET_NULL, related_name='books', null=True)
  
  
  class Book(SimpleModel):
      title = models.CharField(max_length=100)
    author = models.ForeignKey(Author, models.SET_NULL, related_name='books', null=True)
  
  
  class Event(SimpleModel):
      name = models.CharField(max_length=100)
      when = models.DateTimeField()
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/gis_tests/relatedapp/models.py