'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
	async up(queryInterface, Sequelize) {
		await queryInterface.addColumn('convention_users', 'convention_center', {
			type: Sequelize.STRING,
			allowNull: true,
		});
		await queryInterface.renameColumn('event_attendies', 'convention_id', 'convention_user_id');
		await queryInterface.addColumn('convention_users', 'event_id', {
			type: Sequelize.UUID,
			allowNull: true,
		});
	},

	async down(queryInterface, Sequelize) {
		await queryInterface.removeColumn('convention_users', 'convention_center');
		await queryInterface.renameColumn('event_attendies', 'convention_user_id', 'convention_id');
		await queryInterface.removeColumn('convention_users', 'event_id');
	},
};
