'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.addColumn('dimensional_report', 'report_type', {
      type: Sequelize.STRING(30),
      allowNull: false,
      defaultValue: 'LASER_TURRET',
      comment: 'DIMENSIONAL report variant: LASER_TURRET or PRESS_BRAKE'
    });

    await queryInterface.addIndex('dimensional_report', ['report_type'], {
      name: 'idx_dimensional_report_report_type'
    });
  },

  down: async (queryInterface) => {
    await queryInterface.removeIndex('dimensional_report', 'idx_dimensional_report_report_type');
    await queryInterface.removeColumn('dimensional_report', 'report_type');
  }
};

