Hacker News new | ask | show | jobs
by ricksharp 2068 days ago
Are you sure it was the production database that was affected?

If you are not sure how a hard coded script that was targeting localhost affected a production database, how do you know you were even viewing the production database as the one dropped?

Maybe you were simply connected to the wrong database server?

I’ve done that many times - where I had an initial “oh no“ moment and then realized I was just looking at the wrong thing, and everything was ok.

I’ve also accidentally deployed a client website with the wrong connection string and it was quite confusing.

In an even more extreme case: I had been deploying a serverless stack to the entirely wrong aws account - I thought I was using an aws named profile and I was actually using the default (which changed when I got a new desktop system). I.e. aws cli uses —profile flag, but serverless cli uses —aws-profile flag. (Thankfully this all happened during development.)

I now have deleted default profiles from my aws config.