Skip to content

Commit

Permalink
Merge branch 'main' into mikro-orm-patch-30-12-24
Browse files Browse the repository at this point in the history
  • Loading branch information
ndom91 authored Dec 31, 2024
2 parents e0a5ca7 + 48d775a commit c065ba8
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions docs/pages/getting-started/adapters/drizzle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ export const accounts = pgTable(
id_token: text("id_token"),
session_state: text("session_state"),
},
(account) => ({
compoundKey: primaryKey({
columns: [account.provider, account.providerAccountId],
}),
})
)
(account) => [
{
compoundKey: primaryKey({
columns: [account.provider, account.providerAccountId],
}),
},
],
);

export const sessions = pgTable("session", {
sessionToken: text("sessionToken").primaryKey(),
Expand All @@ -111,12 +113,14 @@ export const verificationTokens = pgTable(
token: text("token").notNull(),
expires: timestamp("expires", { mode: "date" }).notNull(),
},
(verificationToken) => ({
compositePk: primaryKey({
columns: [verificationToken.identifier, verificationToken.token],
}),
})
)
(verificationToken) => [
{
compositePk: primaryKey({
columns: [verificationToken.identifier, verificationToken.token],
}),
},
],
);

export const authenticators = pgTable(
"authenticator",
Expand All @@ -132,12 +136,14 @@ export const authenticators = pgTable(
credentialBackedUp: boolean("credentialBackedUp").notNull(),
transports: text("transports"),
},
(authenticator) => ({
compositePK: primaryKey({
columns: [authenticator.userId, authenticator.credentialID],
}),
})
)
(authenticator) => [
{
compositePK: primaryKey({
columns: [authenticator.userId, authenticator.credentialID],
}),
},
],
);
```

</Accordion>
Expand Down

0 comments on commit c065ba8

Please sign in to comment.