Kasmadan (UA)
PPrisma
•Created by Kasmadan (UA) on 1/20/2025 in #help-and-questions
Prisma pulse issue
okay, I see, thanks!
13 replies
PPrisma
•Created by Kasmadan (UA) on 1/14/2025 in #help-and-questions
Console prisma studio
@RaphaelEtim
Thanks!
12 replies
PPrisma
•Created by Kasmadan (UA) on 1/20/2025 in #help-and-questions
Prisma pulse issue
if so, currently cannot do that, do you have plans to fix it? or I should find something else?
13 replies
PPrisma
•Created by Kasmadan (UA) on 1/20/2025 in #help-and-questions
Prisma pulse issue
@Nurul (Prisma)
13 replies
PPrisma
•Created by Kasmadan (UA) on 1/20/2025 in #help-and-questions
Prisma pulse issue
You meant I should use
@prisma/extension-pulse not @prisma/extension-pulse/workerd?
13 replies
PPrisma
•Created by Kasmadan (UA) on 1/14/2025 in #help-and-questions
Console prisma studio
@RaphaelEtim Hi, I'd like to ask about the progress :prismasmile:
12 replies
PPrisma
•Created by Kasmadan (UA) on 1/14/2025 in #help-and-questions
Console prisma studio
@RaphaelEtim if you need something else I will provide
12 replies
PPrisma
•Created by Kasmadan (UA) on 1/14/2025 in #help-and-questions
Console prisma studio
And what I currently have in console
installHook.js:1 Error: {"error_code":"P1012","message":"\u001b[1;91merror\u001b[0m: \u001b[1mError parsing attribute "@relation": A one-to-one relation must use unique fields on the defining side. Either add an
@unique
attribute to the field staffId
, or change the relation to one-to-many.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:36\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m35 | \u001b[0m userEmail String\n\u001b[1;94m36 | \u001b[0m \u001b[1;91mstaff Staff @relation("Booking_staffId_fkey", fields: [staffId], references: [staffId], map: "Booking_staffId_fkey")\u001b[0m\n\u001b[1;94m37 | \u001b[0m staffId Int\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError parsing attribute "@relation": A one-to-one relation must use unique fields on the defining side. Either add an @unique
attribute to the field studioId
, or change the relation to one-to-many.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:39\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m38 | \u001b[0m recordId Int @unique(map: "Booking_recordId_key")\n\u001b[1;94m39 | \u001b[0m \u001b[1;91mstudio Studio @relation("Booking_studioId_fkey", fields: [studioId], references: [studioId], map: "Booking_studioId_fkey")\u001b[0m\n\u001b[1;94m40 | \u001b[0m studioId Int\n\u001b[1;94m | \u001b[0m\n\nValidation Error Count: 2"}12 replies
PPrisma
•Created by Kasmadan (UA) on 1/14/2025 in #help-and-questions
Console prisma studio
Hi, @RaphaelEtim this is my models
model Booking {
id String @id @default(cuid())
status BookingStatus @default(CREATED)
phone String
userEmail String
staffId Int
recordId Int @unique
studioId Int
resourceId Int
servicesCount Int
seanceLength Int
startDate DateTime
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userEmail], references: [email], onDelete: Cascade)
staff Staff @relation(fields: [staffId], references: [staffId])
studio Studio @relation(fields: [studioId], references: [studioId])
@@index([id, recordId, userEmail])
}
model Staff {
id Int @id @default(autoincrement())
name String
avatar String
staffId Int @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
bookings Booking[]
@@index([id])
}
model Studio {
id Int @id @default(autoincrement())
name String
city String
country String
address String
schedule String
studioId Int @unique
latitude Float
longitude Float
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
// users User[]
bookings Booking[]
@@index([id])
}
enum BookingStatus {
UPDATED
CREATED
CANCELED
}
12 replies