<@U0RQY0KK5>, How can pass enum value in default f...
# prisma-whats-new
p
@nilan, How can pass enum value in default for a model field enum AthleteStatus { APPROVED MANAGER_PENDING } type Athlete implements Node { createdAt: DateTime! createdBy: User @relation(name: "CreatedAthlete") graduation: String graduationProgramLength: String graduationUniversity: String graduationYear: Int hightSchool: String hightSchoolUniversity: String hightSchoolYear: Int id: ID! @isUnique status: AthleteStatus! @defaultValue(value: APPROVED) updatedAt: DateTime! user: User! @relation(name: "UserOnAthlete") } getting error: The specified default value 'APPROVED' is not a valid Enum Value for this field (Request ID: cj2sug9wnqt3k0123cszcita4)
n
@ppatidar Hey can you please try
@defaultValue(value: "APPROVED")
instead?
p
not working The specified default value 'APPROVED' is not a valid Enum Value for this field (Request ID: cj2sym9vaaput01237uimdkt5)
n
Can you paste your enum here?
what are available values
p
enum AthleteStatus { APPROVED MANAGER_PENDING }