Fix case sentitivity in some MySQL instances #656
2 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ module.exports = (sequelize, { BOOLEAN, DATE, FLOAT, INTEGER, STRING }) => {
|
|||
|
||||
const selectString = 'DISTINCT(claimId), weight';
|
||||
const whereString = `isChannel = false and time > '${sqlTime}'`;
|
||||
const query = `SELECT ${selectString} FROM trending WHERE ${whereString} ORDER BY weight DESC LIMIT ${limit}`
|
||||
const query = `SELECT ${selectString} FROM Trending WHERE ${whereString} ORDER BY weight DESC LIMIT ${limit}`
|
||||
|
||||
return await sequelize.query(query, { type: sequelize.QueryTypes.SELECT });
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ module.exports = (sequelize, { BOOLEAN, DATE, STRING }) => {
|
|||
const groupString = 'claimId, publisherId, isChannel';
|
||||
|
||||
return sequelize.query(
|
||||
`SELECT ${selectString} FROM views where time > '${sqlTime}' GROUP BY ${groupString}`,
|
||||
`SELECT ${selectString} FROM Views WHERE time > '${sqlTime}' GROUP BY ${groupString}`,
|
||||
{ type: sequelize.QueryTypes.SELECT }
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue