Home > database >  Prisma.io long text with mysql
Prisma.io long text with mysql

Time:06-25

I want an alternative for long Text type in MySql with Prisma

error: Type "TEXT" is neither a built-in type, nor refers to another model, custom type, or enum.

I see Only String

CodePudding user response:

You have to use String with the @db.Text mapping, without it the MySql database mapping by default is varchar(191). See prisma.io/docs/reference/api-reference/prisma-schema-reference#mysql

field String @db.Text
  • Related