I am trying to create an index using sequelize.js addIndex function, the index is created but not with the name specified in the indexName option.
I am using the code below
queryInterface.addIndex('Item',
['name', 'description'], {
indicesType: 'FULLTEXT',
indexName: 'idx_item_fulltext'
})
After running migration, the index is created with the name 'item_name_description' and not 'idx_item_fulltext' which is the name I specified.
For sequelize-cli
and sequelize
version 5+
there are no indicesType
and indexName
properties in addIndex options:
Please try:
queryInterface.addIndex('Item', ['name', 'description'], {
type: 'FULLTEXT',
name: 'idx_item_fulltext'
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With