add isCommission
This commit is contained in:
parent
b0d6e50cf1
commit
85ca3a9b0a
6 changed files with 116 additions and 0 deletions
16
src/migration/1737360654848-update_table_add_isCommission.ts
Normal file
16
src/migration/1737360654848-update_table_add_isCommission.ts
Normal 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\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue