sequelize/sequelize — pull request #2057 by janmeier (2014-07-17 16:49:38+00:00)
Title: Support for specifying indexes on a model

Closes #1485

Allows the user to specify an array of indexes to create on the table, like this:

```js
var Model = this.sequelize.define('model', {
fieldA: Sequelize.STRING,
fieldB: Sequelize.INTEGER,
fieldC: Sequelize.STRING
}, {
indexes: [
{
name: 'a_b_uniq',
unique: true,
method: 'BTREE',
fields: ['fieldB', {attribute:'fieldA', collate: dialect === 'sqlite' ? 'RTRIM' : 'en_US', order: 'DESC', length: 5}]
},
{
type: 'FULLTEXT',
fields: ['fieldC'],
concurrently: true
},
]
})
```