News for hackers. Stuff that matters.
Re:Post mortem on Linear incident from Jan 24th, 2024 by nicolewhite on Tuesday January 30, 2024 @11:35AM (#39192128)
> TRUNCATE TABLE <new_table> CASCADE;

Ouch. DELETE FROM <new_table> is what they wanted here.

Somewhat related, and this wouldn't have saved them since they were using TRUNCATE instead of DELETE, but I always use ON DELETE RESTRICT instead of ON DELETE CASCADE when setting up foreign keys. I'd rather be slightly inconvenienced on the rare occasion I'm hard-deleting data and have to be really explicit about what I want to delete rather than inadvertently allow a "convenience" like ON DELETE CASCADE to delete my data for me.

There are no comments on this comment yet.