What's this error

it was working till yesterday then i added stateDistrict to address model then i started to get this error. Which enumTypes are undefined?
Solution:
Go to vercel, remove the cache and redeploy
Jump to solution
6 Replies
albatroz
albatrozOP2y ago
The webhook api
enum Role {
BASIC
ADMIN
EDITOR
}

enum SubscribePlanEnum {
BASIC
PIECE
GRADING
ALERT
}

model User {
id String @id @default(uuid())
name String?
gstNumber String
phoneNumber String @unique
role Role @default(BASIC)
address Address?
subscribedPlans SubscribePlan[]
createAt DateTime @default(now())
}

model SubscribePlan {
id String @id @default(uuid())
enabledPlan SubscribePlanEnum @default(BASIC)

User User @relation(fields: [userId], references: [id])
userId String

@@unique([id, userId])
@@index([id])
}

model Address {
addressId String @id @default(uuid())
latitude Float
longitude Float
stateDistrict String
user User @relation(fields: [userId], references: [id])
userId String @unique

@@unique([latitude, longitude])
@@index([userId])
}
enum Role {
BASIC
ADMIN
EDITOR
}

enum SubscribePlanEnum {
BASIC
PIECE
GRADING
ALERT
}

model User {
id String @id @default(uuid())
name String?
gstNumber String
phoneNumber String @unique
role Role @default(BASIC)
address Address?
subscribedPlans SubscribePlan[]
createAt DateTime @default(now())
}

model SubscribePlan {
id String @id @default(uuid())
enabledPlan SubscribePlanEnum @default(BASIC)

User User @relation(fields: [userId], references: [id])
userId String

@@unique([id, userId])
@@index([id])
}

model Address {
addressId String @id @default(uuid())
latitude Float
longitude Float
stateDistrict String
user User @relation(fields: [userId], references: [id])
userId String @unique

@@unique([latitude, longitude])
@@index([userId])
}
Panda
Panda2y ago
Add a default value to it or make it nullable
albatroz
albatrozOP2y ago
which field? Got a new error
albatroz
albatrozOP2y ago
Solution
albatroz
albatroz2y ago
Go to vercel, remove the cache and redeploy
Want results from more Discord servers?
Add your server