Skip to content

Commit

Permalink
fix: update compoundKey to fix deprecation message (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
noxify authored Jan 4, 2024
1 parent bb7d386 commit 275f590
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/db/src/schema/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export const accounts = mySqlTable(
session_state: varchar("session_state", { length: 255 }),
},
(account) => ({
compoundKey: primaryKey(account.provider, account.providerAccountId),
compoundKey: primaryKey({
columns: [account.provider, account.providerAccountId],
}),
userIdIdx: index("userId_idx").on(account.userId),
}),
);
Expand Down Expand Up @@ -78,6 +80,6 @@ export const verificationTokens = mySqlTable(
expires: timestamp("expires", { mode: "date" }).notNull(),
},
(vt) => ({
compoundKey: primaryKey(vt.identifier, vt.token),
compoundKey: primaryKey({ columns: [vt.identifier, vt.token] }),
}),
);

0 comments on commit 275f590

Please sign in to comment.