2023-05-18 05:17:37 +12:00
|
|
|
defmodule AshPostgres.TestNoSandboxRepo do
|
|
|
|
@moduledoc false
|
|
|
|
use AshPostgres.Repo,
|
|
|
|
otp_app: :ash_postgres
|
|
|
|
|
|
|
|
def on_transaction_begin(data) do
|
|
|
|
send(self(), data)
|
|
|
|
end
|
|
|
|
|
|
|
|
def installed_extensions do
|
2023-08-09 05:20:26 +12:00
|
|
|
["ash-functions", "uuid-ossp", "pg_trgm", "citext", AshPostgres.TestCustomExtension] --
|
2023-05-18 05:17:37 +12:00
|
|
|
Application.get_env(:ash_postgres, :no_extensions, [])
|
|
|
|
end
|
|
|
|
|
|
|
|
def all_tenants do
|
|
|
|
Code.ensure_compiled(AshPostgres.MultitenancyTest.Org)
|
|
|
|
|
|
|
|
AshPostgres.MultitenancyTest.Org
|
2024-03-28 09:52:28 +13:00
|
|
|
|> Ash.read!()
|
2023-05-18 05:17:37 +12:00
|
|
|
|> Enum.map(&"org_#{&1.id}")
|
|
|
|
end
|
|
|
|
end
|