          class m2msimple(models.Model):
              id2 = models.ForeignKey(ModelWithLongField)
  
          class m2mcomplex(models.Model):
              id2 = models.ForeignKey(ModelWithLongField)
  
          long_field_name = 'a' * (self.max_column_name_length + 1)
          models.ForeignKey(
              VeryLongModelNamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
          ).contribute_to_class(m2msimple, long_field_name)
 
</s> remove             VeryLongModelNamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
 </s> add             VeryLongModelNamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,
            models.CASCADE, </s> remove             id2 = models.ForeignKey(ModelWithLongField)
 </s> add             id2 = models.ForeignKey(ModelWithLongField, models.CASCADE) </s> remove             fk = models.ForeignKey(VeryLongModelNamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz, related_name="rn4")
 </s> add             fk = models.ForeignKey(
                VeryLongModelNamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,
                models.CASCADE,
                related_name="rn4",
            ) </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',
            )
            id2 = models.ForeignKey(ModelWithLongField, models.CASCADE)
          class m2msimple(models.Model):
              id2 = models.ForeignKey(ModelWithLongField)
  
          class m2mcomplex(models.Model):
            id2 = models.ForeignKey(ModelWithLongField, models.CASCADE)
  
          long_field_name = 'a' * (self.max_column_name_length + 1)
          models.ForeignKey(
              VeryLongModelNamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
          ).contribute_to_class(m2msimple, long_field_name)
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/invalid_models_tests/test_models.py