diff --git a/lib/memex/repo/migrator.ex b/lib/memex/repo/migrator.ex index 5ea929f..87c1f40 100644 --- a/lib/memex/repo/migrator.ex +++ b/lib/memex/repo/migrator.ex @@ -15,8 +15,12 @@ defmodule Memex.Repo.Migrator do end def migrate! do - path = Application.app_dir(:memex, "priv/repo/migrations") - Ecto.Migrator.run(Memex.Repo, path, :up, all: true) + path = Application.app_dir(:lokal, "priv/repo/migrations") + Ecto.Migrator.run(Lokal.Repo, path, :up, all: true) + end + + defp automigrate_enabled? do + Application.get_env(:lokal, Lokal.Application, automigrate: false)[:automigrate] end defp automigrate_enabled? do