B
7

My first Python script broke the whole team's database during a demo

I was showing off my automated report tool to my coding group last Tuesday, and it accidentally dropped a whole table instead of just reading from it. Turns out I had a single wrong line where I used `DROP` instead of `SELECT` in a test query - rookie mistake, I know. Has anyone else had a simple typo turn into a bigger mess than expected?
3 comments

Log in to join the discussion

Log In
3 Comments
emma_dixon70
emma_dixon7013d agoMost Upvoted
Heard a story where someone typed `rm -rf` in the wrong folder and nuked their entire project.
7
emma_dixon70
emma_dixon7013d agoMost Upvoted
That's why I always double check before hitting enter now.
2
hugo_robinson25
hugo_robinson2513d agoTop Commenter
Depends on what you mean by "broken" though... like did they lose a day's work or a whole year's worth of data? Most decent databases have backups and snapshots these days, so unless you were running on some janky local setup without any safety nets, it's probably just an annoying hour of restoring from backup. And honestly, if your team is letting a demo script run against a live production database without any permissions or staging environment, that's more of a team process problem than a typo problem. Dropping a table takes a second to fix if you have proper rollbacks or version control on your schema. People act like one wrong character is the end of the world but in reality it's usually just a learning moment and a quick restore.
2