From 42fd0084aab26e71a3e5c10c5aaaeaff8afce13d Mon Sep 17 00:00:00 2001 From: Kittapath Date: Mon, 18 Mar 2024 14:56:08 +0700 Subject: [PATCH] migrate db --- ...pdate_table_salaryprofile_add_salarylevel1.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/migration/1710748447345-update_table_salaryprofile_add_salarylevel1.ts diff --git a/src/migration/1710748447345-update_table_salaryprofile_add_salarylevel1.ts b/src/migration/1710748447345-update_table_salaryprofile_add_salarylevel1.ts new file mode 100644 index 00000000..d94c3370 --- /dev/null +++ b/src/migration/1710748447345-update_table_salaryprofile_add_salarylevel1.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableSalaryprofileAddSalarylevel11710748447345 implements MigrationInterface { + name = 'UpdateTableSalaryprofileAddSalarylevel11710748447345' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileEducation\` ADD \`note\` varchar(255) NULL COMMENT 'หมายเหตุ'`); + await queryRunner.query(`ALTER TABLE \`profileInsignia\` ADD \`note\` varchar(255) NULL COMMENT 'หมายเหตุ'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileInsignia\` DROP COLUMN \`note\``); + await queryRunner.query(`ALTER TABLE \`profileEducation\` DROP COLUMN \`note\``); + } + +}