I am following umbrella apps structure in my project. and I am writing access layer app which doesn't have separate repo but requires to have certain tables and relations migrated for it to work. I dont wanna create separate repo for it and make it complex to maintain configs etc.
I have tried following two approaches
defmodule Data.Repo.Migrations.CreateActions do
use Ecto.Migration
def change do
# First approach
opts = []
file_path = ExAcl.SeedHelper.priv_path_for("20181129092126_create_actions.exs", app: :acl)
Ecto.Migrator.run(Data.Repo, file_path, :up, opts)
{:ok, _} = Application.ensure_all_started(:acl)
# Second approach
Ecto.Migrator.up(HaiData.Repo, 20181129092126, ExAcl.Repo.Migrations.CreateActions)
end
end
But It doesn't run migrations in another app.
Maybe I am not going in right direction. I am not sure what is the best way to run migration in another app
Goal: run migrations in acl app via main data app.