You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reason for not using constrained() in the default user migrations?
e.g. in the recently added sessions table (laravel/laravel@feded74), the user_id column is not constrained to the users table immediately above it.
I'm wondering if this decision was deliberate and if so what was the reasoning?
I've always used constrained() myself to ensure DB consistency and make sure old related data is cleaned with cascadeOnDelete() etc. I just wanted to know if there are some unforeseen issues with using constrained() that I am not appreciating?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a reason for not using
constrained()
in the default user migrations?e.g. in the recently added
sessions
table (laravel/laravel@feded74), theuser_id
column is not constrained to the users table immediately above it.I'm wondering if this decision was deliberate and if so what was the reasoning?
I've always used
constrained()
myself to ensure DB consistency and make sure old related data is cleaned withcascadeOnDelete()
etc. I just wanted to know if there are some unforeseen issues with usingconstrained()
that I am not appreciating?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions