why that not work?
Code:
Schema:
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,
}
})
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])
}

2 Replies
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
:facepalm: thx