module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.sequelize.transaction(t => {
      return Promise.all([
        queryInterface.addColumn(
          "RealEstateRequests",
          "sizeRange",
          {
            type: Sequelize.STRING
          },
          { transaction: t }
        ),
        queryInterface.addColumn(
          "RealEstateRequests",
          "gardenSizeRange",
          {
            type: Sequelize.STRING
          },
          { transaction: t }
        ),
        queryInterface.addColumn(
          "RealEstateRequests",
          "priceRange",
          {
            type: Sequelize.STRING
          },
          { transaction: t }
        )
      ]);
    });
  },

  down: (queryInterface, Sequelize) => {
    return queryInterface.sequelize.transaction(t => {
      return Promise.all([
        queryInterface.removeColumn("RealEstateRequests", "sizeRange", {
          transaction: t
        }),
        queryInterface.removeColumn("RealEstateRequests", "gardenSizeRange", {
          transaction: t
        }),
        queryInterface.removeColumn("RealEstateRequests", "priceRange", {
          transaction: t
        })
      ]);
    });
  }
};
