Always set explicit ForeignKey.on_delete values.
Review Request #10267 — Created Oct. 23, 2018 and submitted
Django 2.0 requires
ForeignKeyinstances to have
Prior to 2.0, these defaulted to
CASCADE, which would delete the
owning model if the object on the other end of the relation was deleted
within Django's ORM. In 2.0, they apparently wanted this to be explicit,
and 1.11 pretty heavily announces deprecation warnings in preparation
This change adds explicit
on_deletesettings for each
the codebase, and updates the creation of
ForeignKeys from a database
signature to provide a suitable default if not found in the signature.
Unit tests pass on Django 1.6 through 1.11, and on 2.1 with other