Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ondelete cascade to StudentData foreign key #119

Open
wunc opened this issue Mar 27, 2023 · 0 comments
Open

Add ondelete cascade to StudentData foreign key #119

wunc opened this issue Mar 27, 2023 · 0 comments
Labels
🗃️ needs-migration Requires a migration

Comments

@wunc
Copy link
Collaborator

wunc commented Mar 27, 2023

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.

@wunc wunc added the 🗃️ needs-migration Requires a migration label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗃️ needs-migration Requires a migration
Projects
None yet
Development

No branches or pull requests

1 participant