diff --git a/lib/ecto/migrator.ex b/lib/ecto/migrator.ex index d1083adb..20ae7bc4 100644 --- a/lib/ecto/migrator.ex +++ b/lib/ecto/migrator.ex @@ -686,7 +686,7 @@ defmodule Ecto.Migrator do Migration files should end in .exs. Use "mix ecto.gen.migration" to generate \ migration files with the correct extension.\ """, - file: file + stacktrace_info(file: file) ) nil @@ -699,6 +699,13 @@ defmodule Ecto.Migrator do end end + # TODO: Remove when we require Elixir 1.14 + if Version.match?(System.version(), ">= 1.14.0") do + defp stacktrace_info(info), do: info + else + defp stacktrace_info(_info), do: [] + end + defp ensure_no_duplication!([{version, name, _} | t]) do cond do List.keyfind(t, version, 0) ->