diff --git a/src/migration/1736140332359-update_eva_add_root.ts b/src/migration/1736140332359-update_eva_add_root.ts new file mode 100644 index 0000000..434ad04 --- /dev/null +++ b/src/migration/1736140332359-update_eva_add_root.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateEvaAddRoot1736140332359 implements MigrationInterface { + name = 'UpdateEvaAddRoot1736140332359' + + public async up(queryRunner: QueryRunner): Promise { + 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 { + await queryRunner.query(`ALTER TABLE \`evaluation\` DROP COLUMN \`orgRootId\``); + await queryRunner.query(`ALTER TABLE \`evaluation\` DROP COLUMN \`root\``); + } + +}