Sequelize-typescript: Indexes

Created on 10 Aug 2017  路  1Comment  路  Source: RobinBuschmann/sequelize-typescript

Hi. How can I add indexes to my tables? I want none unique KEYs to my MySql tables for better optimisation and I'd like to implement indexes as specified for Sequelize:

http://docs.sequelizejs.com/manual/tutorial/models-definition.html#indexes

Thanks

Most helpful comment

Ah, I figured it out:

@Table({
indexes: [{
unique: false,
fields: ['blahId']
}]
})

>All comments

Ah, I figured it out:

@Table({
indexes: [{
unique: false,
fields: ['blahId']
}]
})

Was this page helpful?
0 / 5 - 0 ratings