News for hackers. Stuff that matters.
Re:I deleted data from production by wiz21c on Tuesday October 26, 2021 @02:13AM (#28996999)
Talkinf of personal stories, I'd be very happy to have a tool that enforces some verification process over SQL operation ran on production database (you know, to fix that horrible data quality issue on 2 rows that screws the whole business logic in the upper layer that would take a month to fix).

Basically a tool that allow someone to run some SQL on production but, before doing it, request his credentials, then run the sql command in some "--dry-run" mode and if you modify more than 10 rows, then it stops everything. And if it goes on, record the SQL that was run somewhere so we can audit...

Re:I deleted data from production by idoubtit on Tuesday October 26, 2021 @02:35AM (#28997123)
As a first step toward your wish, I suggest using mycli or pgcli on servers instead of the default mysql or pgsql client. By default, it asks for confirmation whenever you type a destructive command. It does have a log, just like the official CLI clients. It also provides completion and syntax highlighting. https://github.com/dbcli/