Skip to content

Validation errors when using true or false in the column name #522

Closed
@abdullahahmeda

Description

@abdullahahmeda

Description and expected behavior
I have the following schema for true & false questions:

model Question {
  id           Int            @id @default(autoincrement())
  text         String         @db.Text()
  trueText     String?        @db.Text()
  falseText    String?        @db.Text()
  answer       String         @db.Text()
}

When I run npx zenstack generate I get the following error:

Validation errors:
line 79: Expecting token of type '}' but found `true`. [true]
line 80: Expecting token of type '}' but found `false`. [false]

Also the zenstack vs code extension is linting the error:
image

Environment:

  • ZenStack version: 1.0.0-beta.2
  • Prisma version: 4.9.0
  • Database type: Postgresql

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions