PrismaP
Prisma2y ago
4 replies
Baptiste Marchand

Native types for enums

Hi,
I would like to add a native type to an enum field. Like that :
enum Role {
  USER
  ADMIN
}
model User {
  role Role @db.VarChar(191)
}

But when I do a
prisma generate
I get the following error : Attribute not known: "@db.VarChar".
Are native types supported for enums?
Was this page helpful?