'use strict';

module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.addColumn('nesting_stores_request_line', 'nesting_weight', {
      type: Sequelize.DECIMAL(18, 3),
      allowNull: true,
      after: 'nesting_confirmed_qty'
    });

    await queryInterface.addColumn('nesting_stores_request_line', 'scrap_weight', {
      type: Sequelize.DECIMAL(18, 3),
      allowNull: true,
      after: 'nesting_weight'
    });

    await queryInterface.addColumn('nesting_stores_request_line', 'scrap_percentage', {
      type: Sequelize.DECIMAL(10, 3),
      allowNull: true,
      after: 'scrap_weight'
    });
  },

  async down(queryInterface) {
    await queryInterface.removeColumn('nesting_stores_request_line', 'scrap_percentage');
    await queryInterface.removeColumn('nesting_stores_request_line', 'scrap_weight');
    await queryInterface.removeColumn('nesting_stores_request_line', 'nesting_weight');
  }
};

