Re: MySQL table is missing ON DELETE CASCADE constraint

2023-01-24 Thread Jason
you can read through the comments the ticket for the reasons :) On Monday, January 23, 2023 at 3:44:41 AM UTC-5 Dennis Tants wrote: > Thanks for the answers. Still not sure why it would not implement ON > DELETE CASCADE in the DB itself. But whatever. > > Regards, > Dennis > > > On 20/01/2023 2

Re: MySQL table is missing ON DELETE CASCADE constraint

2023-01-23 Thread Dennis Tants
Thanks for the answers. Still not sure why it would not implement ON DELETE CASCADE in the DB itself. But whatever. Regards, Dennis On 20/01/2023 20:15, Jason wrote: https://docs.djangoproject.com/en/4.1/ref/models/fields/#django.db.models.CASCADE > Django emulates the behavior of the SQL c

Re: MySQL table is missing ON DELETE CASCADE constraint

2023-01-20 Thread Jason
https://docs.djangoproject.com/en/4.1/ref/models/fields/#django.db.models.CASCADE > Django emulates the behavior of the SQL constraint ON DELETE CASCADE and also deletes the object containing the ForeignKey. this is specified in the docs. https://code.djangoproject.com/ticket/21961 On Friday,

Re: MySQL table is missing ON DELETE CASCADE constraint

2023-01-20 Thread Bhuvnesh Sharma
Hi dennis, You can open a ticket on the trac (https://code.djangoproject.com/query) for whatever issue you are facing.It will be easier to understand there. Regards Bhuvnesh On Fri, Jan 20, 2023, 8:36 PM Dennis Tants wrote: > Hey folks, > > I recently came across what I think is a bug. Let me

MySQL table is missing ON DELETE CASCADE constraint

2023-01-20 Thread Dennis Tants
Hey folks, I recently came across what I think is a bug. Let me try to explain it as detailed as possible. Imagine I have two models, one is called Events, the other is called EventAccounts. EventAccounts can't exist without an Event, so I added a ForeignKey with the on_delete=models.CASCADE c