import { MigrationInterface, QueryRunner } from "typeorm";

export class EditTypeEmpPosLevel1710220658926 implements MigrationInterface {
    name = 'EditTypeEmpPosLevel1710220658926'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`employeePosLevel\` DROP COLUMN \`posLevelName\``);
        await queryRunner.query(`ALTER TABLE \`employeePosLevel\` ADD \`posLevelName\` int NOT NULL COMMENT 'ชื่อระดับชั้นงาน'`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`employeePosLevel\` DROP COLUMN \`posLevelName\``);
        await queryRunner.query(`ALTER TABLE \`employeePosLevel\` ADD \`posLevelName\` varchar(255) NULL COMMENT 'ชื่อระดับชั้นงาน'`);
    }

}
