เพิ่มฟิวหน่วยงานผู้ค้ำ

This commit is contained in:
Kittapath 2024-04-18 16:17:37 +07:00
parent 109bea3fc8
commit a840274150
5 changed files with 84 additions and 7 deletions

View file

@ -0,0 +1,22 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableDevscholarAddGuarantorOrg1713431125506 implements MigrationInterface {
name = 'UpdateTableDevscholarAddGuarantorOrg1713431125506'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`guarantorRootId\` varchar(255) NULL COMMENT 'id หน่วยงาน'`);
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`guarantorRoot\` varchar(255) NULL COMMENT 'ชื่อหน่วยงาน'`);
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`guarantorOrg\` varchar(255) NULL COMMENT 'ชื่อหน่วยงานที่สังกัด'`);
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`guarantorOrgRootShortName\` varchar(255) NULL COMMENT 'ชื่อย่อหน่วยงาน'`);
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`guarantorOrgRevisionId\` varchar(255) NULL COMMENT 'id revision'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`guarantorOrgRevisionId\``);
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`guarantorOrgRootShortName\``);
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`guarantorOrg\``);
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`guarantorRoot\``);
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`guarantorRootId\``);
}
}