Is there a way to create a unique constrain on a jsonb column in a table?
I have a table with a "label" column that is a jsonb column storing objects that look like this:
I am using Drizzle ORM with node postrgesql.
{ "en": "Girl", "ja": "女性" }. I would like to set up the unique constraint to ensure that each row is unique based on label->>en at least. Is this possible when defining the schema? Or do I need to restort to brute forcing it in the SQL?I am using Drizzle ORM with node postrgesql.