Where do you put migrations during your deployment?

I’m getting started with deployment using distillery and edeliver and am noticing several options for executing migrations.

You can use edeliver’s mix tasks mix edeliver migrate production, or add migrations as commands or hooks in distillery.

What are you guys doing?

Also, do migrations need to be written explicitly as def up, do: ... or def down, do: ... for this? I’ve been writing all my migrations as def change, do: ... to date.

1 Like

I think def change, do: ... is ok unless you execute hardcoded sql like


I don’t think ecto will be able to figure out how to rollback such a change. I might be wrong though.

1 Like

I don’t have anything that crazy, just simple table and index creation.

1 Like