'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    // Add bankName to Merchants
    await queryInterface.addColumn('Merchants', 'bankName', {
      type: Sequelize.STRING,
      defaultValue: '9PSB',
      after: 'merchantAccountNumber'
    });

    // Add bankName to Customers
    await queryInterface.addColumn('Customers', 'bankName', {
      type: Sequelize.STRING,
      defaultValue: '9PSB',
      after: 'accountNumber'
    });
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.removeColumn('Merchants', 'bankName');
    await queryInterface.removeColumn('Customers', 'bankName');
  }
};
