Yes, the methods can be chained. In your case you just perform the addIndex
after createTable
method
return queryInterface.createTable('Todos', {
// columns...
}).then(() => queryInterface.addIndex('Todos', ['author_id', 'title']))
.then(() => {
// perform further operations if needed
});