Skip to content

empty enum array default #947

@chunkerchunker

Description

@chunkerchunker

Description and expected behavior

The following schema fails compilation for zenstack but compiles successfully for prisma:

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

model Test {
  id    String @id
  props TestEnum[] @default([])
}

enum TestEnum {
  A
  B
}

Zenstack generate fails with:

Validation errors:
line: xxx: Value is not assignable to parameter [[]]

Environment

  • ZenStack version: 1.6.2
  • Prisma version: 5.8.0
  • Database type: Postgresql

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions