Skip to content

Commit

Permalink
Fix Ecto :on_conflict upsert deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaslong authored and Oliver Azevedo Barnes committed Jun 26, 2020
1 parent 0d141a1 commit 3029f93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/liquid_voting/voting.ex
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ defmodule LiquidVoting.Voting do
%Participant{}
|> Participant.changeset(attrs)
|> Repo.insert(
on_conflict: :replace_all_except_primary_key,
on_conflict: {:replace_all_except, [:id]},
conflict_target: [:organization_uuid, :email]
)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/liquid_voting/voting_results.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule LiquidVoting.VotingResults do
%Result{}
|> Result.changeset(attrs)
|> Repo.insert!(
on_conflict: :replace_all_except_primary_key,
on_conflict: {:replace_all_except, [:id]},
conflict_target: [:organization_uuid, :proposal_url]
)
end
Expand Down Expand Up @@ -143,4 +143,4 @@ defmodule LiquidVoting.VotingResults do
|> Result.changeset(attrs)
|> Repo.insert!
end
end
end

0 comments on commit 3029f93

Please sign in to comment.