Commit 8c17acfc authored by Mikko Ahlroth's avatar Mikko Ahlroth

Fix release migrations for new Ecto/Phoenix versions

parent 7cab3f1c
Pipeline #39479827 failed with stage
in 9 minutes and 34 seconds
......@@ -68,9 +68,17 @@ defmodule CodeStats.ReleaseMigrator do
defp prepare() do
me = myapp()
# Force start Ecto SQL apps
{:ok, _} = Application.ensure_all_started(:ecto_sql)
# Load the code for myapp, but don't start it
IO.puts("Loading #{me}...")
:ok = Application.load(me)
case Application.load(me) do
:ok -> :ok
{:error, {:already_loaded, :code_stats}} -> :ok
err -> raise "Unknown state for application load: #{inspect(err)}"
end
# Start apps necessary for executing migrations
IO.puts("Starting dependencies...")
......@@ -78,6 +86,6 @@ defmodule CodeStats.ReleaseMigrator do
# Start the Repo(s) for myapp
IO.puts("Starting repos...")
Enum.each(repos(), & &1.start_link(pool_size: 1))
Enum.each(repos(), & &1.start_link(pool_size: 2))
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment