After reading about this delete-happy install script, I was reminded of a lifesaving MySQL command-line option:
What does this do? From the MySQL manual:
Permit only those
DELETE statements that specify which rows to modify by using key values.
In practise, this means that statements such as these will fail:
UPDATE my_table SET some_column = 'A Lovely Value';
DELETE FROM my_table;
As soon as you tell MySQL what to update, the statements will run correctly, for example:
UPDATE my_table SET some_column = 'A Lovely Value' WHERE category_id = 15;
DELETE FROM my_table WHERE id_column = 150;
Have fun and stay safe!