'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
	async up(queryInterface, Sequelize) {
		await queryInterface.sequelize.transaction(async (transaction) => {
			await queryInterface.addColumn(
				'members',
				'account_id',
				{
					type: Sequelize.BIGINT,
					allowNull: true,
					unique: true,
				},
				{ transaction },
			);
		});
	},

	async down(queryInterface, Sequelize) {
		await queryInterface.sequelize.transaction(async (transaction) => {
			await queryInterface.removeColumn('members', 'account_id', { transaction });
		});
	},
};
