In Django, how to add on_delete constraint on an inherited model
<p>I have two models in Django:</p>

<pre><code>from django.db import models

class Car(models.Model):
    ...

class Buick(Car):
    ...
</code></pre>

<p>Currently I can't delete a <code>car</code> with a related <code>buick</code> because I get this error:</p>

<pre><code>django.db.utils.IntegrityError: (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`localdb`.`buick`, CONSTRAINT `car_ptr_id_refs_id_b38c9532` FOREIGN KEY (`car_ptr_id`) REFERENCES `car` (`id`))')
</code></pre>

<p>So I'd like to add a cascade delete buicks when I delete a car, but to where? Django's <code>on_delete</code> is applied to a ForeignKey. But since the foreignkey isn't exposed, I can't think of a django way to do this, only through mysql.</p>