Sorting by Name in SQLite3 Database Is Case-Sensitive and Not Working as Expected
- Dominant language
- TypeScript
- Stars
- 37.9k
- Forks
- 4.9k
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 36
Description
### Describe the Bug
When sorting records by the `name` field in a collection using a SQLite3 database, the results are not ordered as expected. The sorting appears to be case-sensitive, resulting in an order where uppercase and lowercase entries are grouped separately, rather than in a natural alphabetical order. This leads to a confusing user experience, as shown in the attached image.
### To Reproduce
1. Create a new collection in Directus.
2. Add a field named `name` (type: input/text).
3. Insert the following records into the collection:
- `A`
- `a`
- `b`
- `B`
4. Navigate to the display page for the collection.
5. Sort the records by the `name` field.
**Expected Behavior:**
Sorting by name should be case-insensitive, so the records appear in natural alphabetical order: `A`, `a`, `B`, `b` or `a`, `A`, `b`, `B` (depending on collation settings).
### UPDATE:
The numerical sorting isn't correct as well
### Directus Version
v11.9.3
### Hosting Strategy
Self-Hosted (Docker Image)
### Database
sqlite3
Contributor guide
Assessment
This issue has not been assessed yet.