start-ui-web icon indicating copy to clipboard operation
start-ui-web copied to clipboard

Prisma unique is case sensitive

Open charlelisefouasse opened this issue 1 year ago β€’ 2 comments

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

charlelisefouasse avatar Dec 21 '23 14:12 charlelisefouasse

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)

yoannfleurydev avatar Dec 21 '23 19:12 yoannfleurydev

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

houssembaltii avatar May 10 '24 10:05 houssembaltii