Vladimir Sedach

Have Emacs - Will Hack

June 28, 2009

Live SQL database schema updates

Topic: Software engineering

I previously wrote about managing live DB schema changes using protocols and context-oriented programming. About a month ago, I came across Jonathan Oxer's presentation about dealing with live schema changes to MySQL databases. The technique Oxer presents is a kind of obvious-in-hindsight thing that is beautiful in its simplicity: run update scripts and retry if an error (unknown table/column) in the query occurs.

Readers familiar with Geoff Wozniak's work will notice the similarity to Wozniak's ideas about working with undefined functions (previously mentioned on this blog in the context of using metaprogramming techniques to implement DB abstraction layers).