P
Prisma7mo ago
DevPanda

why that not work?

Code:
await prisma.pedOutfitFolder.upsert({
where: { userId: this.db.id, name: 'root' },
update: {},
create: {
name: 'root',
userId: this.db.id,
}
})
await prisma.pedOutfitFolder.upsert({
where: { userId: this.db.id, name: 'root' },
update: {},
create: {
name: 'root',
userId: this.db.id,
}
})
Schema:
model PedOutfitFolder {
id String @id @default(uuid())
userId String
name String
parentId String?

createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

user User @relation(fields: [userId], references: [id])
outfits PedOutfit[]

@@unique([userId, name])
}
model PedOutfitFolder {
id String @id @default(uuid())
userId String
name String
parentId String?

createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

user User @relation(fields: [userId], references: [id])
outfits PedOutfit[]

@@unique([userId, name])
}
No description
2 Replies
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
DevPanda
DevPanda7mo ago
:facepalm: thx
Want results from more Discord servers?
Add your server