แก้ ตำแหน่ง โครงสร้าง

This commit is contained in:
kittapath 2024-09-19 15:57:01 +07:00
parent 475d42cbe4
commit d175165cea
8 changed files with 51 additions and 17 deletions

View file

@ -0,0 +1,18 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateCommandTypeAddIsAttachment1726736124344 implements MigrationInterface {
name = 'UpdateCommandTypeAddIsAttachment1726736124344'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandType\` ADD \`isAttachment\` tinyint NOT NULL COMMENT 'สถานะบัญชีแนบท้าย' DEFAULT 1`);
await queryRunner.query(`ALTER TABLE \`commandType\` ADD \`subtitle\` text NULL COMMENT 'คำอธิบาย'`);
// await queryRunner.query(`ALTER TABLE \`HR_POSITION_OFFICER\` ADD \`FLAG_PERSON_TYPE\` text NULL`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
// await queryRunner.query(`ALTER TABLE \`HR_POSITION_OFFICER\` DROP COLUMN \`FLAG_PERSON_TYPE\``);
await queryRunner.query(`ALTER TABLE \`commandType\` DROP COLUMN \`subtitle\``);
await queryRunner.query(`ALTER TABLE \`commandType\` DROP COLUMN \`isAttachment\``);
}
}