How to create my own data type in Prisma?
I want to create data type to store TIME WITH TIMEZONE
in PostgreSQL.
CodePudding user response:
You can use DateTime
data type and in an attribute can define to use native PostgreSQL time with timezone type.
Here's how you can define it in schema file
model Time {
time DateTime @db.Timetz(6)
}
Here's a reference for using native database types in docs.