add isCommission

This commit is contained in:
kittapath 2025-01-20 15:14:00 +07:00
parent b0d6e50cf1
commit 85ca3a9b0a
6 changed files with 116 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableAddIsCommission1737360654848 implements MigrationInterface {
name = 'UpdateTableAddIsCommission1737360654848'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`orgChild1\` ADD \`isInformation\` tinyint NOT NULL COMMENT 'ศูนย์สารสนเทศทรัพยากรบุคคล' DEFAULT 0`);
await queryRunner.query(`ALTER TABLE \`orgRoot\` ADD \`isCommission\` tinyint NOT NULL COMMENT 'สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร' DEFAULT 0`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`orgRoot\` DROP COLUMN \`isCommission\``);
await queryRunner.query(`ALTER TABLE \`orgChild1\` DROP COLUMN \`isInformation\``);
}
}