Provide a way of specifying ON DELETE and On UPDATE properties in model DDL
|Database layer (models, ORM)
|Patch needs improvement:
I have read  and I understand that in general Django has good reasons for emulating ON DELETE behaviour such as ON DELETE CASCADE. However we have a case where the database native support is sufficient to meet our needs, and will provide a performance win on a problematically-slow bulk delete operation. It is possible for us to configure this e.g. by using a migration with a RawSQL operation, but if we take this approach we no longer have the ability to recreate the full database state from the django model. Therefore it would be helpful if there was a way to specify these properties in the model, even if django does not rely on them during normal operations.
This would provide feature parity with SQLAlchemy in this area, which also uses emulated cascading behaviour by default, but allows specifying the schema-level constructs to be specified in the DDL .