From cbb9b6ad4984b469bac9ea4080410f5f4cd651c7 Mon Sep 17 00:00:00 2001 From: Abdulrahman-AL-Sabagh <78429703+Abdulrahman-AL-Sabagh@users.noreply.github.com> Date: Fri, 29 Dec 2023 02:05:33 +0100 Subject: [PATCH] Update schema.ts make sure you use the last version of drizzle. There is a new syntax for setting the compoundKey or the composite of the primarykey --- src/db/schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/schema.ts b/src/db/schema.ts index 52273a5..9038cf6 100644 --- a/src/db/schema.ts +++ b/src/db/schema.ts @@ -37,7 +37,7 @@ export const accounts = pgTable( session_state: text("session_state"), }, (account) => ({ - compoundKey: primaryKey(account.provider, account.providerAccountId), + primaryKey: [account.provider, account.providerAccountId], }) ); @@ -57,7 +57,7 @@ export const verificationTokens = pgTable( expires: timestamp("expires", { mode: "date" }).notNull(), }, (vt) => ({ - compoundKey: primaryKey(vt.identifier, vt.token), + primaryKey: [vt.identifier, vt.token], }) );