Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
How to create indexes on expressions - Drizzle Team
DT
Drizzle Team
•
2y ago
•
1 reply
node
How to create indexes on expressions
I
'm wanting to create a unique index with an expression to truncate a timestamp to minutes using postgresql
's
date_trunc
date_trunc
. I
'm unsure how to go about doing this with the drizzle orm core utilities
.
https://www.postgresql.org/docs/current/indexes-expressional.html
https://orm.drizzle.team/docs/indexes-constraints#indexes
PostgreSQL Documentation
11.7. Indexes on Expressions
11
.7
. Indexes on Expressions
# An index column need not be just a column of the underlying table
, but can be
…
Drizzle ORM - Indexes & Constraints
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind
.
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Functional Indexes
DT
Drizzle Team / help
2y ago
Find needed indexes
DT
Drizzle Team / help
2y ago
How to create tables?
DT
Drizzle Team / help
3y ago
indexes with pgTable deprecated
DT
Drizzle Team / help
15mo ago