"use strict";

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.addColumn("Users", "stripeRequirementsCurrentlyDue", {
      type: Sequelize.JSON,
      defaultValue: [],
      allowNull: true,
    });

    await queryInterface.addColumn("Users", "stripeRequirementsPastDue", {
      type: Sequelize.JSON,
      defaultValue: [],
      allowNull: true,
    });

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

    await queryInterface.addColumn("Users", "stripeRequirementsLastUpdated", {
      type: Sequelize.DATE,
      allowNull: true,
    });
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.removeColumn("Users", "stripeRequirementsCurrentlyDue");
    await queryInterface.removeColumn("Users", "stripeRequirementsPastDue");
    await queryInterface.removeColumn("Users", "stripeDisabledReason");
    await queryInterface.removeColumn("Users", "stripeRequirementsLastUpdated");
  },
};
