Support the ongoing development of Laravel.io →
posted 10 years ago
Database

I'm struggling to get my head around migrations at the minute. I have an existing table with a foreign key that I want to add a new onDelete constraint to so that it deletes the associated data on deletion. How do I do this? I can only find details of how to do this when creating the column.

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.