-
|
As far as I know, email addresses are generally not case-sensitive, and some users tend to type their email with capital letters in them. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
You can opt for your edit: this won't work for filters |
Beta Was this translation helpful? Give feedback.
-
|
My workaround for this so far is to add the following as extendPrismaSchema(schema) {
return schema
.split('\n')
.map(line => {
if (line.includes('email') || line.includes('clientEmail')) {
return line + ' @postgresql.Citext'
}
return line
})
.join('\n')
},Where email and clientEmail are the fields I wanted to change to case insensitive. |
Beta Was this translation helpful? Give feedback.
An alternative to
extendPrismaSchemais to usedb.nativeType: 'citext'for thetextfield type:keystone/packages/core/src/fields/types/text/index.ts
Line 49 in 1ed8e2e