เพิ่มเหตุผลเกษียณ
This commit is contained in:
parent
38871bcc80
commit
c2f71acad9
2 changed files with 23 additions and 0 deletions
|
|
@ -159,6 +159,13 @@ export class Profile extends EntityBase {
|
|||
})
|
||||
isLeave: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เหตุผลเกษียณ",
|
||||
default: null,
|
||||
})
|
||||
leaveReason: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableProfileAddLeaveReason1716649829280 implements MigrationInterface {
|
||||
name = 'UpdateTableProfileAddLeaveReason1716649829280'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`leaveReason\` varchar(255) NULL COMMENT 'เหตุผลเกษียณ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`leaveReason\` varchar(255) NULL COMMENT 'เหตุผลเกษียณ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`leaveReason\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`leaveReason\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue