add field commandType.isSalary

This commit is contained in:
Bright 2024-12-06 17:57:19 +07:00
parent 35fb72e45d
commit 59d0e30192
2 changed files with 20 additions and 0 deletions

View file

@ -80,6 +80,12 @@ export class CommandType extends EntityBase {
})
isAttachment: boolean;
@Column({
comment: "สถานะแก้ไขเงินเดือน",
default: true,
})
isSalary: boolean;
@Column({
nullable: true,
comment: "คำอธิบาย",

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableCommandTypeAddIsSalary1733482389096 implements MigrationInterface {
name = 'UpdateTableCommandTypeAddIsSalary1733482389096'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandType\` ADD \`isSalary\` tinyint NOT NULL COMMENT 'สถานะแก้ไขเงินเดือน' DEFAULT 1`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandType\` DROP COLUMN \`isSalary\``);
}
}