From 80ccc19a919419f71498891817a0a86ef9d7e67b Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Thu, 26 Dec 2024 15:23:09 -0500 Subject: [PATCH] fix: use passed in version of postgres when modifying existing repo --- lib/mix/tasks/ash_postgres.install.ex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/mix/tasks/ash_postgres.install.ex b/lib/mix/tasks/ash_postgres.install.ex index 60a3b6a7..636fe999 100644 --- a/lib/mix/tasks/ash_postgres.install.ex +++ b/lib/mix/tasks/ash_postgres.install.ex @@ -536,18 +536,16 @@ if Code.ensure_loaded?(Igniter) do end end - defp configure_min_pg_version_function(zipper, _repo, _version, _opts) do + defp configure_min_pg_version_function(zipper, _repo, version, _opts) do case Igniter.Code.Function.move_to_def(zipper, :min_pg_version, 0) do {:ok, zipper} -> {:ok, zipper} _ -> - min_pg_version = get_min_pg_version() - {:ok, Igniter.Code.Common.add_code(zipper, """ def min_pg_version do - %Version{major: #{min_pg_version.major}, minor: #{min_pg_version.minor}, patch: #{min_pg_version.patch}} + %Version{major: #{version.major}, minor: #{version.minor}, patch: #{version.patch}} end """)} end