'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.addColumn('production_costing', 'production_costing_number', {
      type: Sequelize.STRING(80),
      allowNull: true
    });

    await queryInterface.addIndex('production_costing', ['production_costing_number'], {
      unique: true,
      name: 'production_costing_number_uq'
    });
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.removeIndex('production_costing', 'production_costing_number_uq');
    await queryInterface.removeColumn('production_costing', 'production_costing_number');
  }
};
