From d0bc394e36dbb101c5685f465e3d6406770b3229 Mon Sep 17 00:00:00 2001 From: zimt28 <1764689+zimt28@users.noreply.github.com> Date: Sun, 5 Feb 2023 18:46:44 +0100 Subject: [PATCH] fix: Actually use `AshPostgres.Repo` behaviour (#129) --- lib/repo.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/repo.ex b/lib/repo.ex index 8e39719..d4453af 100644 --- a/lib/repo.ex +++ b/lib/repo.ex @@ -52,9 +52,9 @@ defmodule AshPostgres.Repo do @doc "Return a list of all schema names (only relevant for a multitenant implementation)" @callback all_tenants() :: [String.t()] @doc "The path where your tenant migrations are stored (only relevant for a multitenant implementation)" - @callback tenant_migrations_path() :: String.t() + @callback tenant_migrations_path() :: String.t() | nil @doc "The path where your migrations are stored" - @callback migrations_path() :: String.t() + @callback migrations_path() :: String.t() | nil @doc "The default prefix(postgres schema) to use when building queries" @callback default_prefix() :: String.t() @doc "Allows overriding a given migration type for *all* fields, for example if you wanted to always use :timestamptz for :utc_datetime fields" @@ -68,6 +68,8 @@ defmodule AshPostgres.Repo do adapter: Ecto.Adapters.Postgres, otp_app: otp_app + @behaviour AshPostgres.Repo + defoverridable insert: 2, insert: 1, insert!: 2, insert!: 1 def installed_extensions, do: []