davidpink
PPrisma
•Created by davidpink on 11/9/2024 in #help-and-questions
Error when updating Record
enum LocationTypeShort {
studio
shop
retreat
school
}
10 replies
PPrisma
•Created by davidpink on 11/9/2024 in #help-and-questions
Error when updating Record
model LocationType {
id String @id @default(cuid())
name String @db.VarChar(255)
slug String @unique
i18nextKey String
icon LocationTypeShort
createdAt DateTime @default(now())
locations Location[]
}
model Location {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
slug String @unique
name String @db.VarChar(255)
ownerId String
owner User @relation(fields: [ownerId], references: [id], onDelete: Restrict)
isVerified Boolean @default(false)
verifiedAt DateTime?
verifiedPlaceId String? @db.VarChar(255)
onboardingCompleted Boolean @default(false)
locationTypes LocationType[]
@@index([slug])
}
there’s no migration file. I tried to update the location types with
locationTypes: locationTypes
? {
set: [],
connect: locationTypes?.map((locationType) => ({
id: locationType,
})),
}
: undefined,
10 replies
PPrisma
•Created by davidpink on 11/9/2024 in #help-and-questions
Error when updating Record
great, thank you. Keep me posted
10 replies