chore: support adapter option to use AshPostgres.Repo

This commit is contained in:
Zach Daniel 2024-04-21 11:11:00 -04:00
parent 90ae9aeef9
commit 7f3661ce42
2 changed files with 3 additions and 1 deletions

View file

@ -82,7 +82,7 @@ defmodule AshPostgres.Repo do
otp_app = opts[:otp_app] || raise("Must configure OTP app")
use Ecto.Repo,
adapter: Ecto.Adapters.Postgres,
adapter: opts[:adapter] || Ecto.Adapters.Postgres,
otp_app: otp_app
end

View file

@ -79,6 +79,7 @@ defmodule AshPostgres.Test.Post do
defaults([:destroy])
destroy :destroy_with_confirm do
require_atomic?(false)
argument(:confirm, :string, allow_nil?: false)
change(fn changeset, _ ->
@ -93,6 +94,7 @@ defmodule AshPostgres.Test.Post do
end
destroy :soft_destroy_with_confirm do
require_atomic?(false)
argument(:confirm, :string, allow_nil?: false)
change(fn changeset, _ ->