You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model User {
id String @id @default(cuid())
email String @unique @email @length(6, 32)
password String @password @omit
contents Content[]
// everybody can signup
@@allow('create', true)
// full access by self
@@allow('all', auth() == this)
}
abstract model BaseContent {
published Boolean @default(false)
@@index([published])
}
model Content extends BaseContent {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
owner User @relation(fields: [ownerId], references: [id])
ownerId String
contentType String
@@delegate(contentType)
}
model Post extends Content {
title String
}
model Video extends Content {
name String
duration Int
}
⌛️ ZenStack CLI v2.7.0, running plugins
Prisma schema loaded from prisma\schema.prisma
Error: Prisma schema validation - (get-dmmf wasm)
Error code: P1012
error: Error validating model "Post": The index definition refers to the unknown fields: published.
--> prisma\schema.prisma:48
|
47 |
48 | @@index([published])
|
error: Error validating model "Video": The index definition refers to the unknown fields: published.
--> prisma\schema.prisma:57
|
56 |
57 | @@index([published])
|
Validation Error Count: 2
[Context: getDmmf]
Prisma CLI Version : 5.21.0
✖ Generating Prisma schema
Prisma: Failed to run "prisma generate"```
The text was updated successfully, but these errors were encountered:
Cannot put index in abstract model used by delegate model.
See https://github.com/eqqe/reprod-zenstack for reproduction.
The text was updated successfully, but these errors were encountered: