Reputation: 1205
Hello guys Im beginner in Sequelize and Node js, I have read their offical docs, read their github, searched blog post and couldnt solve it. Im constantly getting warning messages :
GMT sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at node_modules/sequelize/lib/sequelize.js:236:13
This error is only happening when running migrations but this is not happening when Im starting server normally
Herei is my connection.js file
Upvotes: 0
Views: 1137
Reputation: 1205
So I googled for few days and here is the answer: operator alliases must be set to false when connecting to database like this:
sequelize = new Sequelize(config.database, config.username, config.password, Object.assign({}, config, {
pool: dbConst.pool,
operatorsAliases: false,
})
Also in migrations.config.json, operatorAliases must be set to false And in your code always use Sequalize.Op
Upvotes: 2