I am using sequelize and node.js. I have one column that want change it's type to unique, when I want run the migration I have this err , How can I solve it?
ERROR: SequelizeUniqueConstraintError: Validation error
this is my code :
up: (queryInterface, Sequelize) => {
return Promise.all([
queryInterface.changeColumn('PersonalInfo', 'ssn', {type: Sequelize.STRING, unique: true
}),
queryInterface.changeColumn('PersonalInfoDraft', 'ssn', {type: Sequelize.STRING, unique:true
})
])
}