I cannot convince why my sequelize models is not updated when I add new column in table.
I've added new column 'status INTEGER' in my table and updated as follow in Models of my table in sequelize. When I retrieve value from my table, it coming nothing.

},
status: {
type: DataTypes.INTEGER,
default: 0
}
Please help me how to solve that issue. And even I've run migration as follow.
module.exports = {
up: function (migration, DataTypes, done) {
function addDisabledColumn() {
return migration.addColumn('applications', 'status',
{
type: DataTypes.INTEGER,
default: 0
}
)
}
addDisabledColumn().then(function () {
done();
}, function (err) {
done(err);
});
},
down: function (migration, DataTypes, done) {
done()
}
};
you need to resync the table for changes to take effect try sequalize.sync({force:true})
hope it helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With