From 4d4306863deb1451250e54f3340f9c3641700ecb Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 3 Apr 2024 13:36:59 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=9F=E0=B8=B4=E0=B8=A7=E0=B8=95=E0=B8=B3=E0=B9=81?= =?UTF-8?q?=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87=E0=B8=97=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9A=E0=B8=A3=E0=B8=B4=E0=B8=AB?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/DevelopmentHistory.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; From 8a5a7ac360f38840089f8763995009e891316e4b Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 3 Apr 2024 13:38:58 +0700 Subject: [PATCH 2/2] no message --- ...12-update_table_developmentHistory_add_type1.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/migration/1712126314212-update_table_developmentHistory_add_type1.ts 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\``); + } + +}