'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, _Sequelize) {
    await queryInterface.removeColumn('projects', 'theme_config_json');
    await queryInterface.removeColumn('projects', 'custom_css_json');
    await queryInterface.removeColumn('projects', 'cdn_base_url');
  },

  async down(queryInterface, Sequelize) {
    await queryInterface.addColumn('projects', 'theme_config_json', {
      type: Sequelize.JSON,
      allowNull: true,
    });
    await queryInterface.addColumn('projects', 'custom_css_json', {
      type: Sequelize.JSON,
      allowNull: true,
    });
    await queryInterface.addColumn('projects', 'cdn_base_url', {
      type: Sequelize.TEXT,
      allowNull: true,
    });
  },
};
