Migrate problem with Distillery

Hi all, I’m trying to run migrate in release packed by distillery, here’s what I have in rel/config.exs:

release :myapp do
  set version: current_version(:myapp)
  set applications: [
  set commands: [
    "seed": "rel/commands/seed.sh",
    "migrate": "rel/commands/migrate.sh"

And here’s what I have in rel/commands/migrate.sh:


$RELEASE_ROOT_DIR/bin/myapp command Elixir.MyApp.ReleaseTasks migrate

I just copied the ReleaseTasks code from https://github.com/bitwalker/distillery/blob/master/docs/Running%20Migrations.md.

When I run bin/myapp migrate, nothing happens in my database. If I run bin/myapp console then run Elixir.MyApp.ReleaseTasks.migrate in iex directly, I can see the all my tables created.

I have no idea what could be wrong here, any help would be appreciated.

I’m afraid the example code in distillery doc is broken. Will file the issue there.

1 Like