BearStudio / start-ui-web

πŸš€ Start UI [web] is an opinionated UI starter with 🟦 TypeScript, βš›οΈ React, ⚫️ NextJS, ⚑️ Chakra UI, 🟦 tRPC, πŸ” Lucia Auth, β–² Prisma, πŸ–οΈ TanStack Query, πŸ“• Storybook, 🎭 Playwright,πŸ“‹ React Hook Form,β—½From the 🐻 BearStudio Team
https://demo.start-ui.com
MIT License
1.39k stars 129 forks source link

Prisma unique is case sensitive #427

Open charlelisefouasse opened 10 months ago

charlelisefouasse commented 10 months ago

Currently, on start ui V2 , prisma @unique constraint is case sensitive. You can create two items 'test' and 'Test' as it is considered different. It would be nice to have a case insensitive unique constraint

yoannfleurydev commented 10 months ago

My first thought is that we have to handle it at a database level (we are using Postgres, we need to check the options available)

houssembaltii commented 6 months ago

is citext extension for PostgreSQL a possible solution ? https://www.prisma.io/docs/orm/prisma-schema/postgresql-extensions#how-to-introspect-postgresql-extensions

also found this : https://github.com/prisma/prisma/issues/3851#issuecomment-703504485

if yes , i would like to open a pull request and apply this solution