migrate
This commit is contained in:
parent
0d190479e2
commit
72e3e66afe
1 changed files with 16 additions and 0 deletions
16
src/migration/1736140332359-update_eva_add_root.ts
Normal file
16
src/migration/1736140332359-update_eva_add_root.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateEvaAddRoot1736140332359 implements MigrationInterface {
|
||||
name = 'UpdateEvaAddRoot1736140332359'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`evaluation\` ADD \`root\` varchar(255) NULL COMMENT 'สำนักงานที่สังกัด'`);
|
||||
await queryRunner.query(`ALTER TABLE \`evaluation\` ADD \`orgRootId\` varchar(255) NULL COMMENT 'ไอดีสำนักงานที่สังกัด'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`evaluation\` DROP COLUMN \`orgRootId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`evaluation\` DROP COLUMN \`root\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue