chore: remove ancient adapter code

This commit is contained in:
Zach Daniel 2024-06-10 11:29:45 -04:00
parent ae9671158f
commit 8dc0c2cb05
2 changed files with 0 additions and 21 deletions

View file

@ -3627,14 +3627,6 @@ defmodule Ash.Changeset do
:append_and_remove | :append | :remove | :direct_control | :create :append_and_remove | :append | :remove | :direct_control | :create
@spec manage_relationship_opts(manage_relationship_type()) :: Keyword.t() @spec manage_relationship_opts(manage_relationship_type()) :: Keyword.t()
def manage_relationship_opts(:replace) do
Logger.warning(
"`type: :replace` has been renamed to `:append_and_remove` in 2.0, and it will be removed in 2.1"
)
manage_relationship_opts(:append_and_remove)
end
def manage_relationship_opts(:append_and_remove) do def manage_relationship_opts(:append_and_remove) do
[ [
on_lookup: :relate, on_lookup: :relate,

View file

@ -49,19 +49,6 @@ defmodule Ash.Resource.Verifiers.ValidateManagedRelationshipOpts do
if ensure_compiled?(relationship) do if ensure_compiled?(relationship) do
try do try do
opts =
if opts[:opts][:type] == :replace do
Logger.warning(
"type: :replace has been renamed to `:append_and_remove` in 2.0, and it will be removed in 2.1"
)
Keyword.update!(opts, :opts, fn inner_opts ->
Keyword.put(inner_opts, :type, :append_and_remove)
end)
else
opts
end
manage_opts = manage_opts =
if opts[:opts][:type] do if opts[:opts][:type] do
defaults = Ash.Changeset.manage_relationship_opts(opts[:opts][:type]) defaults = Ash.Changeset.manage_relationship_opts(opts[:opts][:type])