From efd2f3bf23660456f8b2773c3c77f23b6cd871af Mon Sep 17 00:00:00 2001 From: bill bittner Date: Mon, 14 May 2018 15:23:50 -0700 Subject: [PATCH] removed symbol based operators --- server/models/certificate.js | 2 +- server/models/claim.js | 2 +- server/models/index.js | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) 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