debianize-mobilizon/lib/mobilizon/cli.ex

12 lines
260 B
Elixir
Raw Normal View History

defmodule Mobilizon.CLI do
2020-10-22 15:19:01 +02:00
@app :mobilizon
def migrate do
Application.load(@app)
for repo <- Application.fetch_env!(@app, :ecto_repos) do
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
end
end
end