Prisma 1 Forum

Prisma:1.31 and mySQL support for UUID's as primary keys?

I loaded the latest prisma code thinking that finally we are getting UUID PK’s for mySQL and when I try to use them, I get the following error.

x– The field uuid is marked as id must have one of the following types: ID!,Int!.

type User {
uuid: UUID! @id(strategy: AUTO)
name: String!

The datamodel 1.1 docs say that

The @id directive can be applied to scalar fields of types:

  • ID
  • UUID
  • Int

So what is the reality?


We currently do not support UUID in MySQL. Only the postgresql connector supports it.
So you will need to provide it manually if you want to use UUID with mySQL

Then let’s say that in the Documentation

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.