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
Hi, thanks for the great work. When I parse my schema with the parser, it will throw this error because we have model as one of our table's field name.
To reproduce, just parse this schema:
// https://www.prisma.io/docs/concepts/components/prisma-schema
// added some fields to test keyword ambiguous
datasource db {
url = env("DATABASE_URL")
provider = "postgresql"
}
generator client {
provider = "prisma-client-js"
}
model User {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
email String @unique
name String?
role Role @default(USER)
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
published Boolean @default(false)
title String @db.VarChar(255)
author User? @relation(fields: [authorId], references: [id])
authorId Int?
// keyword test
model String
generator String
datasource String
enum String
}
enum Role {
USER
ADMIN
}
The text was updated successfully, but these errors were encountered:
Hi, thanks for the great work. When I parse my schema with the parser, it will throw this error because we have
model
as one of our table's field name.To reproduce, just parse this schema:
The text was updated successfully, but these errors were encountered: