• Buckshot@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    2 hours ago

    We’ve all done that at some point.

    That sinking feeling when your quick update doesn’t return immediately.

    Good to get into the habit of wrapping your queries in a begin transaction/rollback until you verify the result 😁

    • bitjunkie@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      1 hour ago

      I was never able to fully form the habit with transactions. The guardrails I use are writing the where clause first and keeping my query tool in read-only mode for prod connections and only disabling it once I’m sure I need to make a change.