From e06f107fbc697f3c5e0ee81a71a7df753b774d17 Mon Sep 17 00:00:00 2001 From: Vishtar Date: Thu, 27 Jun 2024 21:23:34 +0400 Subject: [PATCH] upsertUser query fix --- src/db/queries/upsertUser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/queries/upsertUser.ts b/src/db/queries/upsertUser.ts index 0e15222..7fed63a 100644 --- a/src/db/queries/upsertUser.ts +++ b/src/db/queries/upsertUser.ts @@ -2,5 +2,5 @@ import type { TDbConnection } from '../../types' import { users } from '../schema' export const upsertUser = (db: TDbConnection, values: typeof users.$inferInsert) => { - return db.insert(users).values(values).onConflictDoNothing() + return db.insert(users).values(values).onConflictDoNothing({ target: users.id }) }