"use strict";

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.addColumn("KybApplications", "contactPersonName", {
      type: Sequelize.STRING,
      allowNull: true,
    });

    await queryInterface.addColumn("KybApplications", "companyPhone", {
      type: Sequelize.STRING,
      allowNull: true,
    });

    await queryInterface.addColumn("KybApplications", "companyEmail", {
      type: Sequelize.STRING,
      allowNull: true,
    });

    await queryInterface.addColumn("KybApplications", "natureOfBusiness", {
      type: Sequelize.STRING,
      allowNull: true,
    });

    await queryInterface.addColumn("KybApplications", "isLicensed", {
      type: Sequelize.BOOLEAN,
      defaultValue: false,
      allowNull: false,
    });

    await queryInterface.addColumn("KybApplications", "licenseDocumentUrl", {
      type: Sequelize.STRING,
      allowNull: true,
    });

    await queryInterface.addColumn("KybApplications", "expectedMonthlyVolume", {
      type: Sequelize.STRING,
      allowNull: true,
    });
  },

  down: async (queryInterface) => {
    await queryInterface.removeColumn("KybApplications", "contactPersonName");
    await queryInterface.removeColumn("KybApplications", "companyPhone");
    await queryInterface.removeColumn("KybApplications", "companyEmail");
    await queryInterface.removeColumn("KybApplications", "natureOfBusiness");
    await queryInterface.removeColumn("KybApplications", "isLicensed");
    await queryInterface.removeColumn("KybApplications", "licenseDocumentUrl");
    await queryInterface.removeColumn("KybApplications", "expectedMonthlyVolume");
  },
};
