import { MigrationInterface, QueryRunner } from "typeorm";

export class UpdateCommandTypeAddOrder1726479252659 implements MigrationInterface {
    name = 'UpdateCommandTypeAddOrder1726479252659'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`commandType\` ADD \`order\` int NULL COMMENT 'ลำดับความสำคัญ'`);
        // await queryRunner.query(`ALTER TABLE \`HR_POSITION_OFFICER\` ADD \`FLAG_PERSON_TYPE\` text NULL`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        // await queryRunner.query(`ALTER TABLE \`HR_POSITION_OFFICER\` DROP COLUMN \`FLAG_PERSON_TYPE\``);
        await queryRunner.query(`ALTER TABLE \`commandType\` DROP COLUMN \`order\``);
    }

}
