'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
	async up(queryInterface, Sequelize) {
		await queryInterface.renameColumn('hotel_reviews', 'content', 'review');

		await queryInterface.addColumn('hotel_reviews', 'is_anonymous', {
			type: Sequelize.BOOLEAN,
			allowNull: false,
			defaultValue: false,
		});
	},

	async down(queryInterface, Sequelize) {
		await queryInterface.renameColumn('hotel_reviews', 'review', 'content');
		await queryInterface.removeColumn('hotel_reviews', 'is_anonymous');
	},
};
