Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Enforce case-insensitive username uniqueness #557

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

aaronleopold
Copy link
Collaborator

@aaronleopold aaronleopold commented Jan 8, 2025

Fixes #556

I've adjusted the username column manually to add COLLATE NOCASE according to https://www.prisma.io/docs/orm/prisma-client/queries/case-sensitivity#sqlite-provider. I've also adjusted the frontend validation to ignore case when comparing.

I have tested manual DB insertion/updates and confirmed the migration enforces case-insensitive usernames (e.g., oromei or OrOmEI are equal). I'll try to do another validation pass tomorrow before merging, though. Edit to add that I've also tested the migration doesn't blow up my user or existing preferences, which is good I guess lol

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

see 8 files with indirect coverage changes

@aaronleopold aaronleopold marked this pull request as ready for review January 10, 2025 19:09
@aaronleopold aaronleopold merged commit 1331426 into experimental Jan 10, 2025
9 checks passed
@aaronleopold aaronleopold deleted the al/case-insensitive-usernames branch January 10, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant