Skip to content

Commit 3016a64

Browse files
0xPoejosevalim
andauthored
pass through migrations_path option to mix ecto.migrate (#343)
* pass through migrations_path option to mix ecto.migrate * Update lib/mix/tasks/ecto.gen.migration.ex Co-authored-by: José Valim <[email protected]>
1 parent 585c2d1 commit 3016a64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mix/tasks/ecto.gen.migration.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ defmodule Mix.Tasks.Ecto.Gen.Migration do
8282
create_file file, migration_template(assigns)
8383

8484
if open?(file) and Mix.shell().yes?("Do you want to run this migration?") do
85-
Mix.Task.run "ecto.migrate", ["-r", inspect(repo)]
85+
Mix.Task.run "ecto.migrate", ["-r", inspect(repo), "--migrations-path", path]
8686
end
8787

8888
file
@@ -99,7 +99,7 @@ defmodule Mix.Tasks.Ecto.Gen.Migration do
9999
"#{y}#{pad(m)}#{pad(d)}#{pad(hh)}#{pad(mm)}#{pad(ss)}"
100100
end
101101

102-
defp pad(i) when i < 10, do: << ?0, ?0 + i >>
102+
defp pad(i) when i < 10, do: <<?0, ?0 + i>>
103103
defp pad(i), do: to_string(i)
104104

105105
defp migration_module do

0 commit comments

Comments
 (0)