diff --git a/server/models/certificate.js b/server/models/certificate.js index 723b5065..5dc5120a 100644 --- a/server/models/certificate.js +++ b/server/models/certificate.js @@ -158,7 +158,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => { where: { name : channelName, claimId: { - $like: `${channelClaimId}%`, + [sequelize.Op.like]: `${channelClaimId}%`, }, }, order: [['height', 'ASC']], diff --git a/server/models/claim.js b/server/models/claim.js index 409ad94c..75a221f5 100644 --- a/server/models/claim.js +++ b/server/models/claim.js @@ -303,7 +303,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => { where: { name, claimId: { - $like: `${shortId}%`, + [sequelize.Op.like]: `${shortId}%`, }}, order: [['height', 'ASC']], }) diff --git a/server/models/index.js b/server/models/index.js index 6c030cd6..748db1b8 100644 --- a/server/models/index.js +++ b/server/models/index.js @@ -15,7 +15,9 @@ const {database, username, password} = require('../../config/mysqlConfig.js'); const sequelize = new Sequelize(database, username, password, { host : 'localhost', dialect : 'mysql', - dialectOptions: {decimalNumbers: true}, + dialectOptions: { + decimalNumbers: true + }, logging : false, pool : { max : 5, @@ -23,6 +25,7 @@ const sequelize = new Sequelize(database, username, password, { idle : 10000, acquire: 10000, }, + operatorsAliases: false, }); // establish mysql connection