3 ms·
Really depends on the related data, but there‘s the option to use ON DELETE CASCADE|RESTRICT and set null or set default. Cascade can be a bit of a footgun, a
by config_yml 4y ago
Really depends on the related data, but there‘s the option to use ON DELETE CASCADE|RESTRICT and set null or set default.
Cascade can be a bit of a footgun, as this can trigger a waterfall of deletes.
- danparsonson 4y agoCascades can also lead to deadlocks as I found to my cost the one and so far only time I tried using hard deletes.