Tidy up migration generation code a bit
- make `pad/1` start its pipeline with a raw value
This commit is contained in:
parent
8a40849e7c
commit
151b74348c
|
|
@ -32,7 +32,7 @@ defmodule Mix.Tasks.Isn.Gen.Migration do
|
||||||
"#{y}#{pad(m)}#{pad(d)}#{pad(hh)}#{pad(mm)}#{pad(ss)}"
|
"#{y}#{pad(m)}#{pad(d)}#{pad(hh)}#{pad(mm)}#{pad(ss)}"
|
||||||
end
|
end
|
||||||
|
|
||||||
defp pad(s), do: to_string(s) |> String.rjust(2, ?0)
|
defp pad(s), do: s |> to_string() |> String.rjust(2, ?0)
|
||||||
|
|
||||||
embed_template :migration, """
|
embed_template :migration, """
|
||||||
defmodule <%= inspect @mod %> do
|
defmodule <%= inspect @mod %> do
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue