From 1899969901cdbb20e8704b2337744a301c575d0f Mon Sep 17 00:00:00 2001 From: Kittapath Date: Thu, 28 Mar 2024 10:29:16 +0700 Subject: [PATCH] migrate db --- ...96443220-update_table_salaryprofile_add_root.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/migration/1711596443220-update_table_salaryprofile_add_root.ts diff --git a/src/migration/1711596443220-update_table_salaryprofile_add_root.ts b/src/migration/1711596443220-update_table_salaryprofile_add_root.ts new file mode 100644 index 0000000..c48d5c9 --- /dev/null +++ b/src/migration/1711596443220-update_table_salaryprofile_add_root.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableSalaryprofileAddRoot1711596443220 implements MigrationInterface { + name = 'UpdateTableSalaryprofileAddRoot1711596443220' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`salaryOrg\` ADD \`root\` varchar(255) NULL COMMENT 'orgRoot'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`salaryOrg\` DROP COLUMN \`root\``); + } + +}