From 5fe690e2b901f4834b327b986bc6fb1f2d8b5916 Mon Sep 17 00:00:00 2001 From: Evan Cloutier <9866928+evancloutier@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:04:30 -0400 Subject: [PATCH] Use mix ecto.setup instead of mix ecto.migrate and seed command (#1087) * Use mix ecto.setup instead of mix ecto.migrate and seed command * Update snapshot for elixir_ecto --- src/providers/elixir.rs | 3 +-- tests/snapshots/generate_plan_tests__elixir_ecto.snap | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/providers/elixir.rs b/src/providers/elixir.rs index 620df39c5..5cc5a2d06 100644 --- a/src/providers/elixir.rs +++ b/src/providers/elixir.rs @@ -52,8 +52,7 @@ impl Provider for ElixirProvider { } if mix_exs_content.contains("postgrex") && mix_exs_content.contains("ecto") { - build_phase.add_cmd("mix ecto.migrate"); - build_phase.add_cmd("mix run priv/repo/seeds.exs"); + build_phase.add_cmd("mix ecto.setup"); } plan.add_phase(build_phase); diff --git a/tests/snapshots/generate_plan_tests__elixir_ecto.snap b/tests/snapshots/generate_plan_tests__elixir_ecto.snap index 5da5bb31a..178043c4b 100644 --- a/tests/snapshots/generate_plan_tests__elixir_ecto.snap +++ b/tests/snapshots/generate_plan_tests__elixir_ecto.snap @@ -17,8 +17,7 @@ expression: plan ], "cmds": [ "mix compile", - "mix ecto.migrate", - "mix run priv/repo/seeds.exs" + "mix ecto.setup" ] }, "install": {