Best practices for database migrations

James Laver james.laver at
Mon Nov 18 08:51:39 GMT 2013

Simon Wistow <simon at> wrote:
>Is there a current favourite for doing database migrations (i.e having
>programatic way for a database to upgraded to a new version by having a
>series of sql commands run on it)?

There are quite a few ways of doing it. What database are you using? If postgres you can do this in pure DDL/SQL with transactions and a unique constraint on your migrations table (but up and down are different files).

If not postgres, I recommend ragtime (clojure) which manages the same interface for a jumber of databases from the command line through lein.


Sent from my Android device with K-9 Mail. Please excuse my brevity.

More information about the mailing list