Only change a few fields `ON CONFLICT` in an Upsert
Let's say I am implementing GitHub login myself. I have a User resource with a few attributes, and its create action is an
upsert
. Its working and Ash generates the right query, however, I want Ash to not include a few fields in the ON CONFLICT
part.
This is the query Ash generates:
I would instead want this (only two fields instead of all):
How would I go about doing this?
This is my current action:
2 Replies
There is a tool for this, although perhaps a bit strangely named
I'd like to improve this in the future.
And make it an explicit option, like
upsert_fields [:foo, :bar]
Thanks!