chore: update next auth migration guide

This commit is contained in:
Bereket Engida
2024-11-20 15:15:54 +03:00
parent ef62ef276d
commit aa6d7084c5

View File

@@ -67,14 +67,14 @@ In this guide, well explore how to seamlessly transition a project from Next
}); });
``` ```
**NOTE:** If you're using orm adapters, you can also map the fields in the adapter like **NOTE:** If you're using orm adapters, you can also map the fields in your schema file
**Example with Prisma** **Example with Prisma**
```prisma title="schema.prisma" ```prisma title="schema.prisma"
model Session { model Session {
id String @id @default(cuid()) id String @id @default(cuid())
expires DateTime @map("expiresAt") // Map expires to your existing expires field // [!code highlight] expires DateTime @map("expiresAt") // Map expires to your existing expires field // [!code highlight]
token String @@map("sessionToken") // Map token to your existing sessionToken field // [!code highlight] token String @map("sessionToken") // Map token to your existing sessionToken field // [!code highlight]
userId String userId String
user User @relation(fields: [userId], references: [id]) user User @relation(fields: [userId], references: [id])
} }