diff --git a/core/server/data/schema/commands.js b/core/server/data/schema/commands.js index 9ae1c2e53a..13558108ec 100644 --- a/core/server/data/schema/commands.js +++ b/core/server/data/schema/commands.js @@ -43,6 +43,9 @@ function addTableColumn(tableName, table, columnName) { if (columnSpec.hasOwnProperty('defaultTo')) { column.defaultTo(columnSpec.defaultTo); } + if (columnSpec.hasOwnProperty('index') && columnSpec.index === true) { + column.index(); + } } function addColumn(tableName, column, transaction) {