12 lines
260 B
Elixir
12 lines
260 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
|