5 ms·
Unfortunately these sort of mistakes are seen as a "right of passage" for many developers. I ran "`DELETE FROM users;` without a WHERE clause against production
by pistoriusp 3y ago
Unfortunately these sort of mistakes are seen as a "right of passage" for many developers. I ran "`DELETE FROM users;` without a WHERE clause against production in my first year on the job. I felt absolutely terrible. I thought I was connected to a development machine.
Fortunately we had backups available.
Often this isn't a problem with the individual developer itself, but points to a problem with the organization. Frankly most developers shouldn't have access to a production database, let alone mutable access.
One major concern is loss of data, but another is privacy.
It's so frustrating to see this happening when there are tools that solve this like Snaplet (I'm a founder), and Replibyte that allow you to generate or obfuscate data for usage in dev-environments, and Neon that allows you to branch your database.
- tianzhou 3y agoWe are also building Bytebase, which enforces the change review process for such operations
- pistoriusp 3y agoIt looks like we’re getting downvoted, lol. Not sure why that’s a thing. Bytebase is awesome. We should write about each other in our docs. You do the migration and we’ll do the data.
- kgeist 3y agoI think DB engines should simply have some sort of a default option in the interactive mode where if you write "delete from table", it asks "Are you sure? You're going to wipe out the entire table! Y/N". Would've probably solved 99% problems.
- namaria 3y agoI think you mean 'rite of passage'
- pistoriusp 3y agoIndeed. Thanks for the heads up.