Problem with on_delete=models.CASCADE and MariaDB

12 views
Skip to first unread message

Jan Marquardt

unread,
Sep 17, 2019, 7:35:42 AM9/17/19
to django...@googlegroups.com
Hi everyone,

I am relatively new to Django and struggeling with on_delete=models.CASCADE and
MariaDB. I have two simple models which are associated to each other through a
ForeignKey. If I delete one parent object, I would expect the child objects to be deleted,
but I get an IntegrityError exception instead.

models.py: https://pastebin.com/xhfKmSAY
views.py: https://pastebin.com/gB5utyv7
urls.py: https://pastebin.com/9L90VKwh

Exception: https://pastebin.com/WspvLiiR

MySQL `show create table`: https://pastebin.com/yT1sjx9P

I was not yet able to test it with MySQL. With Postgres everything works as intended.

Any help/hints/advices would be appreciated.

Best Regards

Jan

signature.asc
Reply all
Reply to author
Forward
0 new messages