Re:We do not use foreign keys (2016)
by michaelt on Friday November 08, 2019 @06:01PM
(#21487821)
> or just run a query to check for invalid rows at 3am every morning
One of the nice things you get from database FK constraints is when something messes up the data, you get an exception thrown in the code that's messing it up, complete with a backtrace and whatever inputs and timestamps you care to log.
One of the nice things you get from database FK constraints is when something messes up the data, you get an exception thrown in the code that's messing it up, complete with a backtrace and whatever inputs and timestamps you care to log.