'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    // Add received_quantity to purchase_order_item table
    await queryInterface.addColumn('purchase_order_item', 'received_quantity', {
      type: Sequelize.DECIMAL(18, 3),
      allowNull: false,
      defaultValue: 0.000,
      comment: 'Quantity received against this PO item'
    });
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.removeColumn('purchase_order_item', 'received_quantity');
  }
};

