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.
def change, do: ... is ok unless you execute hardcoded sql like
CREATE EXTENSION IF NOT EXISTS postgis;
I don’t think ecto will be able to figure out how to rollback such a change. I might be wrong though.
I don’t have anything that crazy, just simple table and index creation.