add isDeputy
This commit is contained in:
parent
96edba3c08
commit
7aeafcd723
4 changed files with 83 additions and 0 deletions
14
src/migration/1729505298515-update_root_add_isdeputy.ts
Normal file
14
src/migration/1729505298515-update_root_add_isdeputy.ts
Normal 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\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue