195
submitted 10 months ago by Dio9sys@lemmy.blahaj.zone to c/asklemmy@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] chahk@beehaw.org 31 points 10 months ago* (last edited 10 months ago)

My first week on a new job I ran a DELETE query without (accidentally) selecting the WHERE clause. In Prod. I thought I was going to get fired on the spot, but my boss was a complete bro about it, and helped with data restore personally.

Everyone at that company was great both professionally and personally. It's the highlight of my 30+ year career.

[-] dan@upvote.au 13 points 10 months ago

That's the employer's fault for making it so easy to connect to prod with read-write permissions. Not your fault.

[-] peter@feddit.uk 4 points 10 months ago

At my last job I was given write permissions to production and I asked for read only credentials instead, I know my own stupidity

[-] dan@upvote.au 1 points 10 months ago

At my workplace, the command-line database tool (which is essentially just a wrapper around the standard MySQL CLI) connects with a read-only role by default, and you need to explicitly pass a flag to it to connect with a read-write role. The two roles use separate ACLs so we can grant someone just read-only access if they don't need write access.

[-] jjjalljs@ttrpg.network 2 points 10 months ago

+1

We have read only access.

Also transactions are good ideas.

Also my database tool (the one built into pycharm) warns and requires you to hit submit a second time if you try a delete or update without a where. Discovered this on local where I really did want to update every record, but it's a good setting.

[-] chahk@beehaw.org 1 points 10 months ago

Look at mister fancy pants over here with a database tool. Back in my time we had to use Query Analyzer uphill both ways.

[-] chahk@beehaw.org 1 points 10 months ago

Oh there was plenty of blame to go around. I wasn't exactly fresh out of school either. I had "extensive experience with SQL Server" on my resume by then.

this post was submitted on 14 Dec 2023
195 points (98.0% liked)

Asklemmy

43781 readers
1366 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS