'use strict';

module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.addColumn('production_order', 'nesting_number', {
      type: Sequelize.STRING(30),
      allowNull: true
    });
    await queryInterface.addIndex('production_order', ['nesting_number'], {
      name: 'idx_production_order_nesting_number'
    });
  },

  async down(queryInterface) {
    await queryInterface.removeIndex('production_order', 'idx_production_order_nesting_number');
    await queryInterface.removeColumn('production_order', 'nesting_number');
  }
};
