From ac9e184ee74154de2e329114348301d5ee9aa3d5 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Mon, 17 Jun 2024 13:27:38 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20totalPoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/kpiUserEvaluation.ts | 8 ++++++++ ...pdate_table_kpiUserEvaluation_add_totalPoint.ts | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/migration/1718605582205-update_table_kpiUserEvaluation_add_totalPoint.ts diff --git a/src/entities/kpiUserEvaluation.ts b/src/entities/kpiUserEvaluation.ts index b4918be..3507875 100644 --- a/src/entities/kpiUserEvaluation.ts +++ b/src/entities/kpiUserEvaluation.ts @@ -156,6 +156,14 @@ export class KpiUserEvaluation extends EntityBase { }) capacityPoint: number; + @Column({ + type: "double", + nullable: true, + default: null, + comment: "คะแนนประเมิน", + }) + totalPoint: number; + @Column({ nullable: true, length: 40, diff --git a/src/migration/1718605582205-update_table_kpiUserEvaluation_add_totalPoint.ts b/src/migration/1718605582205-update_table_kpiUserEvaluation_add_totalPoint.ts new file mode 100644 index 0000000..e106662 --- /dev/null +++ b/src/migration/1718605582205-update_table_kpiUserEvaluation_add_totalPoint.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableKpiUserEvaluationAddTotalPoint1718605582205 implements MigrationInterface { + name = 'UpdateTableKpiUserEvaluationAddTotalPoint1718605582205' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`totalPoint\` double NULL COMMENT 'คะแนนประเมิน'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`totalPoint\``); + } + +}