I've got a dumb question: in a `prisma migrate` da...
# prisma-migrate
w
I've got a dumb question: in a
prisma migrate
data migration in MySQL, how do I generate a "Prisma" ID - you know, one that looks like
cl30ffuzq04558gfz8s0gi65y
? Is there a utility in MySQL, or maybe a stored-procedure I can create that generates compatible values to those Prisma generates?
n
Hey Wade 👋 You are looking for
cuid()
to generate unique identifier. Here’s how you can define cuid in your schema file
Copy code
model User {
  id   String @id @default(cuid())
  name String
}
Here’s the prisma schema reference for cuid - Reference