2017-09-26 05:30:45 +02:00
|
|
|
module.exports = {
|
|
|
|
up: (queryInterface, Sequelize) => {
|
|
|
|
// logic for transforming into the new state
|
2017-11-07 23:47:41 +01:00
|
|
|
const p1 = queryInterface.changeColumn(
|
2017-11-08 16:25:21 +01:00
|
|
|
'Claim',
|
|
|
|
'amount',
|
|
|
|
{
|
|
|
|
type : Sequelize.DECIMAL(19, 8),
|
|
|
|
allowNull: true,
|
|
|
|
}
|
|
|
|
);
|
|
|
|
const p2 = queryInterface.changeColumn(
|
2017-10-26 00:37:11 +02:00
|
|
|
'Claim',
|
2017-11-07 23:47:41 +01:00
|
|
|
'effectiveAmount',
|
2017-09-26 05:30:45 +02:00
|
|
|
{
|
2017-11-08 16:25:21 +01:00
|
|
|
type : Sequelize.DECIMAL(19, 8),
|
2017-09-26 05:30:45 +02:00
|
|
|
allowNull: true,
|
|
|
|
}
|
|
|
|
);
|
2017-11-08 16:25:21 +01:00
|
|
|
return Promise.all([p1, p2]);
|
2017-09-26 05:30:45 +02:00
|
|
|
},
|
|
|
|
down: (queryInterface, Sequelize) => {
|
|
|
|
// logic for reverting the changes
|
2017-11-07 23:47:41 +01:00
|
|
|
const p1 = queryInterface.changeColumn(
|
2017-11-08 16:25:21 +01:00
|
|
|
'Claim',
|
|
|
|
'amount',
|
|
|
|
{
|
|
|
|
type : Sequelize.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
}
|
|
|
|
);
|
|
|
|
const p2 = queryInterface.changeColumn(
|
2017-10-26 00:37:11 +02:00
|
|
|
'Claim',
|
2017-11-07 23:47:41 +01:00
|
|
|
'effectiveAmount',
|
|
|
|
{
|
2017-11-08 16:25:21 +01:00
|
|
|
type : Sequelize.DOUBLE,
|
2017-11-07 23:47:41 +01:00
|
|
|
allowNull: true,
|
|
|
|
}
|
2017-09-26 05:30:45 +02:00
|
|
|
);
|
2017-11-08 16:25:21 +01:00
|
|
|
return Promise.all([p1, p2]);
|
2017-09-26 05:30:45 +02:00
|
|
|
},
|
|
|
|
};
|