16 lines
963 B
TypeScript
16 lines
963 B
TypeScript
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\``);
|
|
}
|
|
|
|
}
|