Skip to content

Commit

Permalink
Fix release task and add db_migrate script #94
Browse files Browse the repository at this point in the history
  • Loading branch information
x-ji committed Oct 21, 2020
1 parent ffcdb9c commit 125d40c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/magpie/release_tasks.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ defmodule Magpie.ReleaseTasks do

def db_migrate do
Application.load(:magpie)
{:ok, _, _} = Migrator.with_repo(:magpie, &Migrator.run(&1, :up, all: true))
{:ok, _, _} = Migrator.with_repo(Magpie.Repo, &Migrator.run(&1, :up, all: true))
end
end
3 changes: 3 additions & 0 deletions rel/overlays/db_migrate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

bin/magpie eval 'Magpie.ReleaseTasks.db_migrate()'

0 comments on commit 125d40c

Please sign in to comment.