'use strict';

module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.addColumn('department', 'process_order_no', {
      type: Sequelize.INTEGER,
      allowNull: false,
      defaultValue: 0,
      comment: 'Process order number for managing department workflow sequence'
    });

    await queryInterface.addColumn('department', 'process_end_department', {
      type: Sequelize.INTEGER,
      allowNull: false,
      defaultValue: 0,
      comment: 'Flag to indicate if this is an end department in the process flow (0=No, 1=Yes)'
    });
  },

  async down(queryInterface, Sequelize) {
    await queryInterface.removeColumn('department', 'process_end_department');
    await queryInterface.removeColumn('department', 'process_order_no');
  }
};

