add dialyzer and fix id
All checks were successful
Build and Publish / build-release (push) Successful in 1m28s
All checks were successful
Build and Publish / build-release (push) Successful in 1m28s
This commit is contained in:
@@ -6,12 +6,14 @@ defmodule WorkloadService.Release do
|
||||
@app :workload_service
|
||||
|
||||
def migrate do
|
||||
load_app()
|
||||
init_event_store()
|
||||
:ok = load_app()
|
||||
:ok = init_event_store()
|
||||
|
||||
for repo <- repos() do
|
||||
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
|
||||
end
|
||||
|
||||
:ok
|
||||
end
|
||||
|
||||
def rollback(repo, version) do
|
||||
@@ -24,9 +26,10 @@ defmodule WorkloadService.Release do
|
||||
end
|
||||
|
||||
defp load_app do
|
||||
Application.ensure_all_started(:ssl)
|
||||
Application.ensure_all_started(:postgrex)
|
||||
Application.ensure_loaded(@app)
|
||||
{:ok, _} = Application.ensure_all_started(:ssl)
|
||||
{:ok, _} = Application.ensure_all_started(:postgrex)
|
||||
:ok = Application.ensure_loaded(@app)
|
||||
:ok
|
||||
end
|
||||
|
||||
def init_event_store do
|
||||
@@ -34,4 +37,4 @@ defmodule WorkloadService.Release do
|
||||
|
||||
:ok = EventStore.Tasks.Init.exec(config, [])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user