Skip to content

Cannot use enum as field default when enum is declared after model #389

@he-la

Description

@he-la

Description and expected behavior
#204 attempts to implement setting enum variants as field defaults (prisma supports this). But this does not work when the enum is declared after the model:

${prelude}

model M {
    e E @default(E1)
}

enum E {
    E1
    E2
}

will fail with Value is not assignable to parameter []

Environment (please complete the following information):

  • ZenStack version: 1.0.0-alpha.113
  • Prisma version: 4.11.0
  • Database type: Postgresql

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions