I was wondering if anyone knew how to create a unique constraint on a key in a jsonb column in the prisma.schema file, I know the raw sql to do it but I want to do it via the schema file
✅ 1
Nish Junankar
09/07/2022, 4:58 PM
Copy code
-- CreateIndex
CREATE UNIQUE INDEX "product_details_url_key" ON "products"( (product_detail ->> 'url'));
a
Austin
09/16/2022, 10:51 PM
Hey there!
We have an outstanding similar feature request here, feel free to add a 👍 and your specific use case. This helps our engineering teams prioritize.