diff --git a/src/entities/DevelopmentHistory.ts b/src/entities/DevelopmentHistory.ts index 12b4f6a..90418c6 100644 --- a/src/entities/DevelopmentHistory.ts +++ b/src/entities/DevelopmentHistory.ts @@ -64,6 +64,14 @@ export class DevelopmentHistory extends EntityBase { }) position: string; + @Column({ + nullable: true, + comment: "ชื่อตำแหน่งทางการบริหาร", + length: 255, + default: null, + }) + posExecutive: string; + @Column({ nullable: true, length: 40, @@ -149,6 +157,8 @@ export class CreateDevelopmentHistory { @Column() position: string | null; @Column() + posExecutive: string | null; + @Column() posLevelId: string | null; @Column() posTypeId: string | null; @@ -174,6 +184,8 @@ export class UpdateDevelopmentHistory { @Column() position: string | null; @Column() + posExecutive: string | null; + @Column() posLevelId: string | null; @Column() posTypeId: string | null; diff --git a/src/migration/1712126314212-update_table_developmentHistory_add_type1.ts b/src/migration/1712126314212-update_table_developmentHistory_add_type1.ts new file mode 100644 index 0000000..440e577 --- /dev/null +++ b/src/migration/1712126314212-update_table_developmentHistory_add_type1.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableDevelopmentHistoryAddType11712126314212 implements MigrationInterface { + name = 'UpdateTableDevelopmentHistoryAddType11712126314212' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`developmentHistory\` ADD \`posExecutive\` varchar(255) NULL COMMENT 'ชื่อตำแหน่งทางการบริหาร'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`developmentHistory\` DROP COLUMN \`posExecutive\``); + } + +}