'use strict';

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

	async down(queryInterface, Sequelize) {
		await queryInterface.removeColumn('event_attendies', 'worldcon_ticket_id');
		await queryInterface.changeColumn('event_attendies', 'event_id', {
			type: Sequelize.UUID,
			allowNull: false,
		});
	},
};
