Earlier in my career, I worked in prod support for an insurance web application. It had a DB containing reference data. This reference data was maintained in an Excel spreadsheet; a macro would then spit out CSV files, which would be used by command line scripts to populate databases in different environments (test, staging, pre-production). The DB data was totally replaced each time. Pre-production data would be copied into production, every night or so.
One time, I ran the staging and pre-production scripts at the same time. This had the unusual effect of producing an empty CSV file for pre-production.
When I got in the next day, I discovered all of the production data had been wiped out overnight...
Thankfully, it was all reference data, so it was just a matter of re-running the export macros, and pleading with a DBA to run the data import job during business hours.
I ended up writing a replacement using generated SQL, so we could apply incremental updates (and integrate better with a custom ticketing system).
One time, I ran the staging and pre-production scripts at the same time. This had the unusual effect of producing an empty CSV file for pre-production.
When I got in the next day, I discovered all of the production data had been wiped out overnight...
Thankfully, it was all reference data, so it was just a matter of re-running the export macros, and pleading with a DBA to run the data import job during business hours.
I ended up writing a replacement using generated SQL, so we could apply incremental updates (and integrate better with a custom ticketing system).