| 176 | == Database-level Cascades == |
| 177 | |
| 178 | There's an old ticket to [https://code.djangoproject.com/ticket/21961 Add support for database-level cascading options]. |
| 179 | This means that rather than Django's in-Python options for `on_delete` clauses, we'd allow the database to handle this with it's native implementation. |
| 180 | This would be a new option `db_on_delete` maybe, with the existing `on_delete` being `DO_NOTHING` if it were used. |
| 181 | |
| 182 | This had a couple of PRs that were in the right direction ([https://github.com/django/django/pull/14550 1], [https://github.com/django/django/pull/8661 2]), and [https://groups.google.com/g/django-developers/c/FJMoGgtYIX4/m/LTdjlWydJ2EJ a long-discussion on django-developers]. |
| 183 | Adjusting `DatabaseSchemaEditor.sql_create_fk()` to be able to use the native options is the beginning. |