Use chatGPT to double check too.
"Yes, you can delete those items via that query." "But now all has been deleted??!?! WTF HEEELP" "I apologize for my previous answer, you are correct, you now deleted everything!"
The day I locked everyone out of the company intranet
21–30 of 130 posts
Re: The day I locked everyone out of the company intranet
#22Always do a select with your criteria before doing a Delete or update. Don’t ask me how I learned this.
>Don’t ask me how I learned this. Joke's on you, we all learned it this exact way.
Re: The day I locked everyone out of the company intranet
#23Always do a select with your criteria before doing a Delete or update. Don’t ask me how I learned this.
Now I have learnt to instinctively stop before doing anything destructive and double-check and double-check again! This also applies to SQL `DELETE` and `UPDATE`!
I know that `-r` was not neccessary but hey that was a biiiig mistake of mine!
Re: The day I locked everyone out of the company intranet
#24Always do a select with your criteria before doing a Delete or update. Don’t ask me how I learned this.
Once I wanted to do `rm -fr *~` to delete backup files, but the `~` key didn't register... Now I have learnt to instinctively stop before doing anything destructive and double-check and double-check again! This also applies to SQL `DELETE` and `UPDATE`! I know that `-r` was not neccessary but hey that was a biiiig mistake of mine!
Re: The day I locked everyone out of the company intranet
#25I was working on an old old old "ERP" system written in D3 PICK. It's a database, programming language and OS all in one with roots in tracking military helicopter parts in the 1960's. I was working on it in the mid-2000s. It had SQL like syntax for manipulating data, but it was interactive. So you would SELECT the rows from the table that you wanted, then those rows would be part of your state. You would then do UPD…
You recreated a production database of 20 years data by hand overnight? You deserve an award !!!
Re: The day I locked everyone out of the company intranet
#26Earlier quoted context omitted.
You recreated a production database of 20 years data by hand overnight? You deserve an award !!!
he only recreated the ones not saved by the nightly backup, meaning he used the previous nightly backup and recreated from invoices the last ~23 hours.
Re: The day I locked everyone out of the company intranet
#27Aka DELETE ALL where x == y or DELETE MANY where x == y or perhaps you need an explicit limit for it to not be 1, so DELETE where x == y LIMIT ALL
Re: The day I locked everyone out of the company intranet
#28It turned out, for some arcane reason I still don't understand, our production instance of Artifactory was running on top of Docker Compose with host path volume mounts, and somehow, symlinks that were not valid from the perspective of the host actually were valid from inside the container, and doing this on all of our servers broke Artifactory. For some even stupider reason, we weren't doing full filesystem-level snapshots at any regular interval (which we started doing after this), so instead I needed to enlist the help of the classic wizard ninja guy who had been acting as a mostly unsupervised one-man team for the past six years who had hacked all of this mess together, documented none of it, and was the only person on the planet who knew how to reconstruct everything.
This was probably still only the second-stupidest full on-prem lab outage I remember, behind the time the whole network stopped working and the only person who had been around long enough remembered they had trialed a temporary demo hardware firewall years earlier, management abandoned the evaluation effort, and it somehow remained there as the production firewall for years without ever being updated before finally breaking.
Re: The day I locked everyone out of the company intranet
#29Re: The day I locked everyone out of the company intranet
#30If the author had decided to say nothing the problem would have been bigger - an unhappy boss and probably fired.