On delete cascade in models.py while using mysql on phpmyadmin

Submitted 3 years, 10 months ago
Ticket #22
Views 278
Language/Framework Django
Priority Medium
Status Closed

i have used on delete cascade and on update cascade in my database i.e, mysql. i am using django version 1.11.6 and also i have auto created models.py by using the command 

'python manage.py inspectdb tablename > appname/models.py'

but i didn't see anything regarding the on delete cascade  and on update cascade in my code do i have to worry about it ? or database will take it's care?

Submitted on Jun 16, 20
add a comment

1 Answer

Verified

on delete cascade related to Django. But you can check using insert the data into the table in mysql and try to delete the primary table data. Then you can see its deleting from my child table as well.

Submitted 3 years, 10 months ago


Latest Blogs