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:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user