I have a model that blows up a diff migration because of a model with 2 indexes that haven't changed. It gets picked up as a diff but in the parsedifferences routine the rhs value is null so line 367 blows up. It seems I can only solve this by adding this check.
let index = _.clone(df.rhs);
// sometimes a diff is picked up with no RHS?
if (index)
{
index.actionType = 'addIndex';
index.tableName = tableName;
index.depends = [ tableName ];
actions.push(index);
}
This change makes the diff migration carry on and it seems to work fine. I've found that if I actually make a difference it also "works", but only one time. For example, I thought I fixed this by adding names to all my indexes.
I have a model that blows up a diff migration because of a model with 2 indexes that haven't changed. It gets picked up as a diff but in the parsedifferences routine the rhs value is null so line 367 blows up. It seems I can only solve this by adding this check.
This change makes the diff migration carry on and it seems to work fine. I've found that if I actually make a difference it also "works", but only one time. For example, I thought I fixed this by adding names to all my indexes.
My sequelize model has these indexes