title: How to define an index, within a Sequelize model?
body: <p>I'm trying to create a simple non-unique index for one of my SQL columns, inside a Sequelize model. I tried to follow this post :<a href="https://stackoverflow.com/questions/42195348/how-to-define-unique-index-on-multiple-columns-in-sequelize">How to define unique index on multiple columns in sequelize</a> .</p>
  
  <p>This is my code:</p>
  
  <pre><code>module.exports = (sequelize, DataTypes) =&gt; {
      const Item = sequelize.define('Item', {
          itemId:  DataTypes.STRING,
          ownerId:  DataTypes.INTEGER,
          status: DataTypes.STRING,
          type: DataTypes.STRING,
          nature: DataTypes.STRING,
          content: DataTypes.STRING,
          moment: DataTypes.BIGINT,
          indexes:[
              {
                  unique: 'false',
                  fields:['ownerId']
              }
          ]
  
      });
  
      return Item;
  };
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Unhandled rejection SequelizeDatabaseError: You have an error in your
    SQL syntax; check the manual that corresponds to your MariaDB server
    version for the right syntax to use near '[object Object], <code>createdAt</code>
    DATETIME NOT NULL, <code>updatedAt</code> DATETIME NOT NULL, P' at line 1</p>
  </blockquote>
  
  <p>The code that i have in my server.js file is this:</p>
  
  <pre><code>models.sequelize.sync().then(function () {
      server.listen(port, () =&gt; {
          console.log('server ready')
      })
  });
  </code></pre>
  
  <p>What is wrong with my setup? Is there any other way this can be done with Sequelize?</p>