mirror of
https://github.com/django/django.git
synced 2025-10-26 23:26:08 +00:00
Fixed #25981 -- Added need to update migrations to on_delete deprecation warning.
This commit is contained in:
committed by
Tim Graham
parent
8b6974a685
commit
a856555df2
@@ -747,8 +747,9 @@ class ForeignKey(ForeignObject):
|
||||
|
||||
if on_delete is None:
|
||||
warnings.warn(
|
||||
"on_delete will be a required arg for %s in Django 2.0. "
|
||||
"Set it to models.CASCADE if you want to maintain the current default behavior. "
|
||||
"on_delete will be a required arg for %s in Django 2.0. Set "
|
||||
"it to models.CASCADE on models and in existing migrations "
|
||||
"if you want to maintain the current default behavior. "
|
||||
"See https://docs.djangoproject.com/en/%s/ref/models/fields/"
|
||||
"#django.db.models.ForeignKey.on_delete" % (
|
||||
self.__class__.__name__,
|
||||
@@ -977,8 +978,9 @@ class OneToOneField(ForeignKey):
|
||||
|
||||
if on_delete is None:
|
||||
warnings.warn(
|
||||
"on_delete will be a required arg for %s in Django 2.0. "
|
||||
"Set it to models.CASCADE if you want to maintain the current default behavior. "
|
||||
"on_delete will be a required arg for %s in Django 2.0. Set "
|
||||
"it to models.CASCADE on models and in existing migrations "
|
||||
"if you want to maintain the current default behavior. "
|
||||
"See https://docs.djangoproject.com/en/%s/ref/models/fields/"
|
||||
"#django.db.models.ForeignKey.on_delete" % (
|
||||
self.__class__.__name__,
|
||||
|
||||
Reference in New Issue
Block a user