• EmasXP@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      As a side note, DBeaver actually asks for confirmation if it thinks you are about to do something wonky. I think it’s quite telling just how common this mistake is. We’ve all been there

      • marcos@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Update and delete should require a where clause. You can always use true or 1 = 1, the gain from omitting it is minimal.

        The fact that no DBMS ever decided to implement this, not even as an option is quite distressing.

      • azimir@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Mine was to format the wrong computer on the first day of my first IT internship. I spent the next six weeks there fixing that oopsie.

  • azimir@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Ouch. Gotta wrap those deletes in a transaction and look before it rolls forward. Lessons learned. Time to see if the backups actually have any data on them.

  • vanZuider@feddit.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Don’t call it “accidental database deletion”. Call it “unannounced live exercise of backup procedure”.

  • nighty@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 year ago

    Sometimes I dream of getting fired for accidentally doing shit like this. Sweet relief…

    • Dasnap@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Good companies wouldn’t fire someone for this because:

      1. There should be processes in place to prevent this, or recover from this, anyway. It’s a team/department failure and you would just be the straw that broke the camel’s back.

      2. They now know you’ve experienced this and will hopefully know to never do it again. Bringing in someone else could just reintroduce the issue.