'use strict';

module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.addColumn('bom_header', 'width', {
      type: Sequelize.DECIMAL(15, 3),
      allowNull: true,
      comment: 'Default width from finished material master',
    });

    await queryInterface.addColumn('bom_header', 'height', {
      type: Sequelize.DECIMAL(15, 3),
      allowNull: true,
      comment: 'Default height from finished material master',
    });

    await queryInterface.addColumn('bom_header', 'length', {
      type: Sequelize.DECIMAL(15, 3),
      allowNull: true,
      comment: 'Default length from finished material master',
    });

    await queryInterface.addColumn('bom_header', 'thickness', {
      type: Sequelize.DECIMAL(15, 3),
      allowNull: true,
      comment: 'Default thickness from finished material master',
    });
  },

  async down(queryInterface) {
    await queryInterface.removeColumn('bom_header', 'thickness');
    await queryInterface.removeColumn('bom_header', 'length');
    await queryInterface.removeColumn('bom_header', 'height');
    await queryInterface.removeColumn('bom_header', 'width');
  },
};

