11 lines
259 B
Elixir
11 lines
259 B
Elixir
|
defmodule Mobilizon.Cli do
|
||
|
@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
|