2020-10-27 16:40:14 +01:00
|
|
|
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
|
2020-10-27 16:40:14 +01:00
|
|
|
end
|