              secondary = models.ManyToManyField(Person, through="Membership",
                  related_name="secondary")
  
          class Membership(models.Model):
              person = models.ForeignKey(Person)
              group = models.ForeignKey(Group)
  
          errors = Group.check()
          expected = [
              Error(
                  "The model has two many-to-many relations through "
 
</s> remove             check = models.ForeignKey(ModelWithRelatedManagerCalledCheck)
            article = models.ForeignKey(ModelWithRelatedManagerCalledCheck, related_name='check')
 </s> add             check = models.ForeignKey(ModelWithRelatedManagerCalledCheck, models.CASCADE)
            article = models.ForeignKey(
                ModelWithRelatedManagerCalledCheck,
                models.CASCADE,
                related_name='check',
            ) </s> remove     group = models.ForeignKey(Group)
 </s> add     group = models.ForeignKey(Group, models.CASCADE) </s> remove         person = models.ForeignKey(Person)
        group = models.ForeignKey(Group)
 </s> add         person = models.ForeignKey(Person, on_delete=models.CASCADE)
        group = models.ForeignKey(Group, on_delete=models.CASCADE) </s> remove             f = models.ForeignKey(Target)
 </s> add             f = models.ForeignKey(Target, models.CASCADE) </s> remove     music = models.ForeignKey(Musician)
    group = models.ForeignKey(Group)
 </s> add     music = models.ForeignKey(Musician, models.CASCADE)
    group = models.ForeignKey(Group, models.CASCADE)
            person = models.ForeignKey(Person, models.CASCADE)
            group = models.ForeignKey(Group, models.CASCADE)
              secondary = models.ManyToManyField(Person, through="Membership",
                  related_name="secondary")
  
          class Membership(models.Model):
            person = models.ForeignKey(Person, models.CASCADE)
            group = models.ForeignKey(Group, models.CASCADE)
            person = models.ForeignKey(Person, models.CASCADE)
            group = models.ForeignKey(Group, models.CASCADE)
  
          errors = Group.check()
          expected = [
              Error(
                  "The model has two many-to-many relations through "
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/invalid_models_tests/test_models.py