hrms-api-org/src/migration/1729505298515-update_root_add_isdeputy.ts
2024-10-21 17:11:21 +07:00

14 lines
557 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateRootAddIsdeputy1729505298515 implements MigrationInterface {
name = 'UpdateRootAddIsdeputy1729505298515'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`orgRoot\` ADD \`isDeputy\` tinyint NOT NULL COMMENT 'เป็นปลัด' DEFAULT 0`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`orgRoot\` DROP COLUMN \`isDeputy\``);
}
}