spee.ch/migrations/ChangeAmountColumnType.js
2017-11-07 14:47:41 -08:00

26 lines
580 B
JavaScript

module.exports = {
up: (queryInterface, Sequelize) => {
// logic for transforming into the new state
const p1 = queryInterface.changeColumn(
'Claim',
'amount',
{
type : Sequelize.DOUBLE,
allowNull: true,
}
);
return Promise.all([p1]);
},
down: (queryInterface, Sequelize) => {
// logic for reverting the changes
const p1 = queryInterface.changeColumn(
'Claim',
'amount',
{
type : Sequelize.STRING,
allowNull: true,
}
);
return Promise.all([p1]);
},
};