From 1b4fbb57c913254c10b4b42934c62100cf563108 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 22 Mar 2024 17:58:37 +0700 Subject: [PATCH] migrate db --- ...61801-update_table_profilegov_add_position.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/migration/1711105061801-update_table_profilegov_add_position.ts diff --git a/src/migration/1711105061801-update_table_profilegov_add_position.ts b/src/migration/1711105061801-update_table_profilegov_add_position.ts new file mode 100644 index 00000000..a6f3d2ad --- /dev/null +++ b/src/migration/1711105061801-update_table_profilegov_add_position.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableProfilegovAddPosition1711105061801 implements MigrationInterface { + name = 'UpdateTableProfilegovAddPosition1711105061801' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileGovernment\` ADD \`positionPathSide\` varchar(255) NULL`); + await queryRunner.query(`ALTER TABLE \`profileGovernment\` ADD \`positionExecutiveSide\` varchar(255) NULL`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileGovernment\` DROP COLUMN \`positionExecutiveSide\``); + await queryRunner.query(`ALTER TABLE \`profileGovernment\` DROP COLUMN \`positionPathSide\``); + } + +}