Files
better-auth/packages/cli/test/__snapshots__/schema-mysql.prisma
T
Bereket EngidaandGitHub 047d677966 feat: support stroring dispaly username to store un-normalized username (#1204)
* feat: support stroring dispaly username to store un-normalized username

* test: update snapshot
2025-02-14 12:33:24 +03:00

85 lines
2.0 KiB
Plaintext

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model User {
id String @id
name String @db.Text
email String
emailVerified Boolean
image String? @db.Text
createdAt DateTime
updatedAt DateTime
twoFactorEnabled Boolean?
username String?
displayUsername String? @db.Text
sessions Session[]
accounts Account[]
twofactors TwoFactor[]
@@unique([email])
@@unique([username])
@@map("user")
}
model Session {
id String @id
expiresAt DateTime
token String
createdAt DateTime
updatedAt DateTime
ipAddress String? @db.Text
userAgent String? @db.Text
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([token])
@@map("session")
}
model Account {
id String @id
accountId String @db.Text
providerId String @db.Text
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
accessToken String? @db.Text
refreshToken String? @db.Text
idToken String? @db.Text
accessTokenExpiresAt DateTime?
refreshTokenExpiresAt DateTime?
scope String? @db.Text
password String? @db.Text
createdAt DateTime
updatedAt DateTime
@@map("account")
}
model Verification {
id String @id
identifier String @db.Text
value String @db.Text
expiresAt DateTime
createdAt DateTime?
updatedAt DateTime?
@@map("verification")
}
model TwoFactor {
id String @id
secret String @db.Text
backupCodes String @db.Text
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map("twoFactor")
}