เพิ่มฟิวคำสั่ง

This commit is contained in:
kittapath 2024-09-23 16:16:59 +07:00
parent 90f754c0bd
commit 963a76df10
5 changed files with 51 additions and 3 deletions

View file

@ -0,0 +1,18 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateCommandAddIsAttachment1727081490162 implements MigrationInterface {
name = 'UpdateCommandAddIsAttachment1727081490162'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandSys\` ADD \`order\` int NULL COMMENT 'ลำดับแสดงผล'`);
await queryRunner.query(`ALTER TABLE \`command\` ADD \`isAttachment\` tinyint NOT NULL COMMENT 'สถานะบัญชีแนบท้าย' DEFAULT 1`);
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 \`command\` DROP COLUMN \`isAttachment\``);
await queryRunner.query(`ALTER TABLE \`commandSys\` DROP COLUMN \`order\``);
}
}