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.
4 Replies
cc: @Mykhailo
Hey @Woet! Could you show me your imports please?
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 🙂