Unique Index Constraints with Multiple Columns
I have the following constraint in libSQL:
This isn't parsed correctly by Drizzle but I have edited the migration to correct it:
The idea is to only create notifications if the relevant values of each particular action are unique.
Here's the relevant part of my insert function:
But no matter what I try I always get the error:
I have also tried using multiple unique indexes in the schema instead of the single one, in case it's an issue with coalescing null values:
But I get the same error. All three of these constraints are run, instead of the relevant one.
onConflictDoNothing
does have a where:
option but I tried many ways of using this to narrow down the type and can't get it to work, even using raw sql.0 Replies