From 4f7a38e5c1600e7c98f91ea783b29ef8d4fcab31 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Sun, 7 Jul 2024 10:25:45 +0700 Subject: [PATCH] no message --- src/migration/1720153855533-add_table_salary1.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/migration/1720153855533-add_table_salary1.ts diff --git a/src/migration/1720153855533-add_table_salary1.ts b/src/migration/1720153855533-add_table_salary1.ts new file mode 100644 index 0000000..bd4deb2 --- /dev/null +++ b/src/migration/1720153855533-add_table_salary1.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class AddTableSalary11720153855533 implements MigrationInterface { + name = 'AddTableSalary11720153855533' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`result\``); + await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`result\` varchar(255) NULL COMMENT 'ผลการประเมินผลการปฏิบัติราชการ'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`result\``); + await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`result\` double NULL COMMENT 'ผลการประเมินผลการปฏิบัติราชการ'`); + } + +}