Sometimes it takes a bit of a disaster to force change

Sometimes we keep doing things in the way we always have … even though we know there are better ways – sticking with the same-old-approach is simple. Change is hard.

Like sticking with copy+pasting SQL schema changes into the MySQL CLI. As that is what we’ve always done.

Like what could go wrong?

Especially when somehow GitHub decides to put the whole file into your paste buffer, and that includes DROP TABLE x; before each CREATE TABLE. And I really just wanted the final ‘CREATE TABLE’ in the schema.sql file.

Thankfully Azure provides a Point in Time recovery for MySQL (even if it took the best part of an hour to perform that restore).

 

Leave a Reply

Your email address will not be published. Required fields are marked *