ForeignKey
accepts an on_delete
argument that says that should
happen when the object on the other end of the relation is deleted.
Historically, Django has defaulted to CASCADE
, which deletes the
object on this end of the relation, but there are other options
available.
In order to prevent unintentional deletions, Django 2.0 requires this
option, and Django 1.11 emits a deprecation warning if it's not set.
This change goes through all ForeignKey
fields in Djblets and sets it
to the historical default of CASCADE
.