#What is the best way to use UUID v7 in postgres with Prisma?

5 messages · Page 1 of 1 (latest)

ripe whale
#

Also is there a way to add PL/pgSql using Prisma schema?

cloud nicheBOT
#

You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into #ask-ai for a quick spin!

halcyon chasm
#

You can use UUID v7 like this:

model User {
  id   String @id @default(uuid(7)) @db.Uuid
  name String
}
tribal igloo
#

Why not just use the cuid() function to provide collision resistant UUIDs?