© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Postgres - Unique constraint that allows null - Drizzle Team
DT
Drizzle Team
•
2y ago
•
4 replies
Woet
Postgres - Unique constraint that allows null
I
'm looking to have a unique constraint on a column
, but it should allowed NULL
.
I believe this should be supported according to this documentation page
:
https://orm.drizzle.team/docs/indexes-constraints#unique
But the example from the docs itself gives quite a bit of errors
.
Anyone that could help me to see if I
'm doing something wrong or is there a bug
?
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
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Unique Constraint
DT
Drizzle Team / help
2y ago
conditional unique constraint
DT
Drizzle Team / help
2y ago
Weird unique constraint
DT
Drizzle Team / help
2y ago
MySQL unique constraint
DT
Drizzle Team / help
3y ago