Foreign Key on_delete db Constraints Discussion
The add_foreign_key docs show all the various options for on_delete and others: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_foreign_key
Hi Collin
Great episode, as ever: thank you
My question is "Why bother with the database constraints?". If the Rails associations allow you to specify (eg) "has_many :things, dependent: :nullify", why add the complexity of replicating this at the database level?
I'm sure there is a good reason, but it'd be great to know what it is