title: How to use queryInterface.bulkUpdate from Sequelize when it is necessary to check if a key is present in a jsonb column?
body: <p>I want to use Sequelize migration to update a table in my Postgres database.</p>
  <p>My SQL query uses de <code>?</code> operator from Postgres for JSONB columns.</p>
  <p>The SQL query I need to run is:</p>
  <pre class="lang-sql prettyprint-override"><code>UPDATE messages SET type = 'products' WHERE type = 'gallery' and content ? '%textMain%'
  </code></pre>
  <p>My migration in Sequelize looks like this:</p>
  <pre class="lang-js prettyprint-override"><code>'use strict';
  
  module.exports = {
    up: async (queryInterface, Sequelize) =&gt; {
      await queryInterface.bulkUpdate(
        'messages', 
        { type: 'products' }, 
        // HERE GOES THE WHERE CLAUSE
      )
    },
  
    down: async (_queryInterface, _Sequelize) =&gt; {
    }
  };
  </code></pre>