ok turns out this is something that should be configured on the db columns, ideally not in the queries, makes sense to me https://stackoverflow.com/a/36768933 https://dev.mysql.com/doc/refman/5.7/en/case-sensitivity.html

This commit is contained in:
Ean Milligan
2026-04-23 02:53:07 -04:00
parent 353e6e978d
commit 1f4c4723d3
3 changed files with 28 additions and 32 deletions

View File

@@ -21,18 +21,14 @@ export default async (userId: string, userName: string) => {
let failed = false;
const plans: Plan[] = await dbClient
.query('SELECT id, name, folder, lastUpdated FROM plans WHERE BINARY ownerId = ? AND deleted = 0 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [
userId,
])
.query('SELECT id, name, folder, lastUpdated FROM plans WHERE ownerId = ? AND deleted = 0 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [userId])
.catch((e) => {
failed = true;
});
if (failed) return "Couldn't read DB.";
const deletedPlans: Plan[] = await dbClient
.query('SELECT id, name, folder, lastUpdated FROM plans WHERE BINARY ownerId = ? AND deleted = 1 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [
userId,
])
.query('SELECT id, name, folder, lastUpdated FROM plans WHERE ownerId = ? AND deleted = 1 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [userId])
.catch(() => {
failed = true;
});