♻️ Switch to next-auth for handling authentication (#899)

This commit is contained in:
Luke Vella 2023-10-19 09:14:53 +01:00 committed by GitHub
parent 5f9e428432
commit 6fa66da681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 1514 additions and 1586 deletions

View file

@ -17,18 +17,24 @@ enum TimeFormat {
}
model User {
id String @id @default(cuid())
id String @id @default(cuid())
name String
email String @unique() @db.Citext
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime? @updatedAt @map("updated_at")
comments Comment[]
polls Poll[]
watcher Watcher[]
events Event[]
customerId String? @map("customer_id")
subscription Subscription? @relation(fields: [subscriptionId], references: [id])
subscriptionId String? @unique @map("subscription_id")
email String @unique() @db.Citext
emailVerified DateTime? @map("email_verified")
timeZone String? @map("time_zone")
weekStart Int? @map("week_start")
timeFormat TimeFormat? @map("time_format")
locale String?
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime? @updatedAt @map("updated_at")
customerId String? @map("customer_id")
subscriptionId String? @unique @map("subscription_id")
comments Comment[]
polls Poll[]
watcher Watcher[]
events Event[]
subscription Subscription? @relation(fields: [subscriptionId], references: [id])
@@map("users")
}
@ -70,6 +76,7 @@ model Subscription {
@@map("subscriptions")
}
// @deprecated
model UserPreferences {
userId String @id @map("user_id")
timeZone String? @map("time_zone")
@ -219,3 +226,12 @@ model Comment {
@@index([pollId], type: Hash)
@@map("comments")
}
model VerificationToken {
identifier String
token String @unique
expires DateTime
@@unique([identifier, token])
@@map("verification_tokens")
}