Skip to content
Discussion options

You must be logged in to vote

ah! I got it. From the EXCLUDED table like so:

slackName: sql`EXCLUDED.slack_name\`,

Total:

 await db
     .insert(Users)
     .values(members)
     .onConflictDoUpdate({
       target: Users.slackId,
       set: {
         slackName: sql`EXCLUDED.slack_name`,
         workspaceId: team.id
       },
     })
     .execute();

Thanks Github Copilot :D

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aulneau
Comment options

Answer selected by ThibaultJanBeyer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants