utdal / profiles

A simple CRUD/search profile system for research profiles, providing user-editable information and basic pages to aesthetically promote and highlight researcher activities and achievements.
MIT License
6 stars 0 forks source link

Add ondelete cascade to StudentData foreign key #119

Open wunc opened 1 year ago

wunc commented 1 year ago

Currently, if you want to delete a record from the students DB, you have to manually first delete any associated StudentData. We should probably add an ondelete cascade to the foreign key to avoid this. It added for ProfileData (in migration 2022_05_20_094405_add_user_on_delete_cascade.php) but not StudentData.

edit: this also needs to be added for when a user is deleted, any associated Student records or StudentData records whould be deleted.