import { MigrationInterface, QueryRunner } from "typeorm";

export class UpdateProfileChangeNameAddFieldRank1781174051201 implements MigrationInterface {
    name = 'UpdateProfileChangeNameAddFieldRank1781174051201'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`profileChangeNameHistory\` ADD \`rank\` varchar(40) NULL COMMENT 'ยศ'`);
        await queryRunner.query(`ALTER TABLE \`profileChangeName\` ADD \`rank\` varchar(40) NULL COMMENT 'ยศ'`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`profileChangeName\` DROP COLUMN \`rank\``);
        await queryRunner.query(`ALTER TABLE \`profileChangeNameHistory\` DROP COLUMN \`rank\``);
    }

}
