title: Sequelize unique key not enforced
body: <p>I have the following data model.</p>
  
  <pre><code>const User = Model.define('user', {
    id: {
      type: DataTypes.ID,
      defaultValue: DataTypes.ID_DEFAULT_VALUE,
      primaryKey: true
    },
    merchant_id: {
      type: DataTypes.INTEGER,
      allowNull: false,
      unique: true
    }
  });
  </code></pre>
  
  <p>When I call the <code>User.upsert({ merchant_id: id });</code> with the same <code>merchant_id</code> twice with the same value (let's say <code>1</code>), a new row with merchant_id <code>1</code> is created.</p>
  
  <p>I've also tried adding the following to my model definition with no luck.</p>
  
  <pre><code>indexes: [ { unique: true, fields: ['merchant_id'] } ]
  </code></pre>
  
  <p>According to the docs, I shouldn't need to do more than add <code>unique: true</code> to the field option hash.</p>
  
  <p>Using the following with Express.</p>
  
  <pre><code>"sequelize": "^3.23.4",
  "sqlite3": "^3.1.4"
  </code></pre>