import { MigrationInterface, QueryRunner } from "typeorm";

export class AddStatusEnumToIssues1778208324657 implements MigrationInterface {
    name = 'AddStatusEnumToIssues1778208324657'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`issues\` CHANGE \`status\` \`status\` enum ('NEW', 'IN_PROGRESS', 'RESOLVED', 'CLOSED', 'HELPDESK_IN_PROGRESS', 'REPLIED') NOT NULL COMMENT 'สถานะการแก้ไขปัญหา' DEFAULT 'NEW'`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`issues\` CHANGE \`status\` \`status\` enum ('NEW', 'IN_PROGRESS', 'RESOLVED', 'CLOSED') NOT NULL COMMENT 'สถานะการแก้ไขปัญหา' DEFAULT 'NEW'`);
    }
}
