mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 12:27:44 +00:00
chore: update next auth migration guide
This commit is contained in:
@@ -67,14 +67,14 @@ In this guide, we’ll 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])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user