@unqiue in Prisma Schema. With mySQL/Planetscale, does case sensitivity matter?

Lets take a standard
model User {
name String @unique
}
model User {
name String @unique
}
I understand from reading up (I think at least) that mySQL doesn't care for case sensitivity when using a select query. But what about when inserting data? Does Debaucus match the same way that debaucus does? Because that would lead to issues with usernames and being unique. If that is correct, the unique doesn't cover this edge case, how do you rectify this issue?
3 Replies
Neto
Neto15mo ago
Stack Overflow
SQL unique varchar case sensitivity question
I'm trying to populate a SQL table with a list of words. The table itself it pretty simple: CREATE TABLE WORDS( ID BIGINT AUTO_INCREMENT, WORD VARCHAR(128) NOT NULL UNIQUE, PRIMARY KEY(ID)...
Neto
Neto15mo ago
explains why
Debaucus
Debaucus15mo ago
Awesome, so for my use case of unique usernames, by default unique is truly unique!