diff --git a/lib/migrate.js b/lib/migrate.js index a41fab8..81dc385 100644 --- a/lib/migrate.js +++ b/lib/migrate.js @@ -382,10 +382,13 @@ const parseDifference = function(previousState, currentState) { let tableName = df.path[0]; let index = _.clone(df.rhs); - index.actionType = 'addIndex'; - index.tableName = tableName; - index.depends = [ tableName ]; - actions.push(index); + if (index) + { + index.actionType = 'addIndex'; + index.tableName = tableName; + index.depends = [ tableName ]; + actions.push(index); + } break; } }