91
arantr
7y

Wonder why my colleague threw this book on my desk?

I accidentally changed all product prices from decimal(10,4) to decimal(10,0) on two live web shops with several thousands of products.

And it's friday 4 pm.
Have a nice weekend!

Comments
  • 1
    That's a good book.
  • 3
    Aaand why did you do that?
  • 0
    @nickhh Accidents happen
  • 5
    @wolt Yeah luckily we had backups and old enough to get the correct prices back with after a few hours of figuring out the correct sql queries.
  • 9
    A) ouch!
    B) dummy.
    C) yay backups
    D) do not repeat
  • 1
    I did the same on a mysql database in production , wanted to change float to double using a db management tool and no more comma , whoops !
  • 5
    Never ever do anything that could break anything (even if completely unrelated) on friday (ever). :)
  • 1
    @cankarales I did it about two weeks ago but we found out about it now.
    Customer was wondering why he could not set price in cents.
    Kinda stupid that inserting a float with decimals after comma does not throw an error but converts it to an integer silently...
  • 0
    That's a bummer...
  • 2
    Congratulations on ranting about it before he could 👍
  • 1
    That tells you that he thinks you need to read more.
  • 1
    that book is worth its money.
  • 3
    THE QUESTION IS WHY YOU DIDN'T DEPLOY IT IN TEST/QAT FIRST SO THE CUSTOMER COULD TEST IT THEN ACCEPT IT BEFORE YOU DEPLOYED IT IN PROD?
  • 0
    @sadjad I know. We did, but we don't have automated tests, and nor the customer or we tested enough. The feature I was deploying was not about product prices... :/
  • 0
    The good thing about this accident is that now we know that our backups are actually backups.

    And also the errors in product prices are only below 1 € so the company probably did not loose/gain huge amounts of money...
  • 0
    How can you do that accitendally? 😀
Add Comment