Loki
Loki

Reputation: 1205

Sequelize Deprecated Error Message when running migration

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

https://pastebin.com/5NKfExib

Upvotes: 0

Views: 1137

Answers (1)

Loki
Loki

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

Related Questions