Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prisma @db.Time(x) - what is x?

Tags:

prisma

After running the npx prisma introspect in the console, the startTime attribute was set to @db.Time(6) in my schema.prisma file.

model Table {
  id           String     @id @default(uuid())
  startTime    DateTime   @map("start_time") @db.Time(6)
}

What does x mean in @db.Time(x) in Prisma schema? Documentation link

P.S. I use PosgreSQL as database

like image 227
Roman Mahotskyi Avatar asked Sep 11 '25 07:09

Roman Mahotskyi


1 Answers

The x is the precision to store in the time type which can be anything from 0-6. You can read more this here.

like image 101
Ryan Avatar answered Sep 14 '25 05:09

Ryan