add isDeputy

This commit is contained in:
kittapath 2024-10-21 17:11:21 +07:00
parent 96edba3c08
commit 7aeafcd723
4 changed files with 83 additions and 0 deletions

View file

@ -0,0 +1,14 @@
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\``);
}
}