A senior developer not checking a one-off SQL update for a WHERE clause is inexcusable. I shouldn't have to worry that *you're* gonna hose a whole table while getting ready to go home.
@bkool In my experience, it's the mid to senior folks MOST likely to do it. You stop paying attention, because you "do this all the time".
There's a reason I think autocommit is the devil's own invention. Having the DB tell you 64,000 rows updated *before* it's committed is a really good indicator you screwed up the SQL, without screwing up your entire day/career.
@shatteredgears Running any sql command on a prod db should give you a different mindset. But I kinda agree that you tend to think, 'this has never or rarely happened'!!! I've had one update fuck-up in prod years ago. It was fortunately very minor (user settings) and really turned out to be a non-issue, but I will always be anxious when running prod updates.
@bkool @shatteredgears With or without a "prod mindset", people of all levels are going to screw up sometimes. If you build your dev team expecting perfection from people ("this is inexcusable"), you're gonna have a bad time. Take backups, build tooling to limit need for the SQL console, and learn from the mistakes that will happen.
How GitLab treated the team member who accidentally deleted a prod db last year: https://about.gitlab.com/2017/03/17/how-is-team-member-1-doing/
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!