Ecto Migrate To

Posted on

Ecto has a nice feature that allows a target migration to be specified.

The example is:

mix ecto.migrate --to 20080906120000

The ID above is the prefix of the migration file name.

I used this when I had a set of migrations to run, but needed to do intermediate work as each one was applied. This made it really easy.