Skip to content

Commit 7f3661c

Browse files
committed
chore: support adapter option to use AshPostgres.Repo
1 parent 90ae9ae commit 7f3661c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/repo.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ defmodule AshPostgres.Repo do
8282
otp_app = opts[:otp_app] || raise("Must configure OTP app")
8383

8484
use Ecto.Repo,
85-
adapter: Ecto.Adapters.Postgres,
85+
adapter: opts[:adapter] || Ecto.Adapters.Postgres,
8686
otp_app: otp_app
8787
end
8888

test/support/resources/post.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ defmodule AshPostgres.Test.Post do
7979
defaults([:destroy])
8080

8181
destroy :destroy_with_confirm do
82+
require_atomic?(false)
8283
argument(:confirm, :string, allow_nil?: false)
8384

8485
change(fn changeset, _ ->
@@ -93,6 +94,7 @@ defmodule AshPostgres.Test.Post do
9394
end
9495

9596
destroy :soft_destroy_with_confirm do
97+
require_atomic?(false)
9698
argument(:confirm, :string, allow_nil?: false)
9799

98100
change(fn changeset, _ ->

0 commit comments

Comments
 (0)