diff --git a/src/entities/CommandType.ts b/src/entities/CommandType.ts index 86a34ba3..f3fb87fe 100644 --- a/src/entities/CommandType.ts +++ b/src/entities/CommandType.ts @@ -80,6 +80,12 @@ export class CommandType extends EntityBase { }) isAttachment: boolean; + @Column({ + comment: "สถานะแก้ไขเงินเดือน", + default: true, + }) + isSalary: boolean; + @Column({ nullable: true, comment: "คำอธิบาย", diff --git a/src/migration/1733482389096-update_table_commandType_add_isSalary.ts b/src/migration/1733482389096-update_table_commandType_add_isSalary.ts new file mode 100644 index 00000000..0ebc05fd --- /dev/null +++ b/src/migration/1733482389096-update_table_commandType_add_isSalary.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableCommandTypeAddIsSalary1733482389096 implements MigrationInterface { + name = 'UpdateTableCommandTypeAddIsSalary1733482389096' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`commandType\` ADD \`isSalary\` tinyint NOT NULL COMMENT 'สถานะแก้ไขเงินเดือน' DEFAULT 1`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`commandType\` DROP COLUMN \`isSalary\``); + } + +}