DT
Drizzle Team•7mo ago
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.
No description
4 Replies
Woet
WoetOP•7mo ago
No description
alexblokh
alexblokh•7mo ago
cc: @Mykhailo
Mykhailo
Mykhailo•7mo ago
Hey @Woet! Could you show me your imports please?
Woet
WoetOP•7mo ago
Thanks for getting back to me on this @Mykhailo , I already found a way to fix the issue I was having. Already a couple of days ago, so I don't exactly remember what the solution was anymore, but seems to work now 🙂
Want results from more Discord servers?
Add your server