use credo style

This commit is contained in:
2023-02-04 17:36:27 -05:00
parent cd7220cea3
commit ad7810a8ea
19 changed files with 46 additions and 45 deletions

View File

@ -7,7 +7,9 @@ defmodule Memex.Release do
def rollback(repo, version) do
load_app()
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :down, to: version))
{:ok, _fun_return, _apps} =
Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :down, to: version))
end
defp load_app do
@ -18,7 +20,8 @@ defmodule Memex.Release do
load_app()
for repo <- Application.fetch_env!(@app, :ecto_repos) do
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
{:ok, _fun_return, _apps} =
Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
end
end
end

View File

@ -6,11 +6,11 @@ defmodule Memex.Repo.Migrator do
use GenServer
require Logger
def start_link(_) do
def start_link(_opts) do
GenServer.start_link(__MODULE__, [], [])
end
def init(_) do
def init(_opts) do
migrate!()
{:ok, nil}
end