hrms-api-org/src/migration/1736158197838-update_table_profile_edu_add_level.ts
2025-01-06 17:19:14 +07:00

14 lines
811 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileEduAddLevel1736158197838 implements MigrationInterface {
name = 'UpdateTableProfileEduAddLevel1736158197838'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileEducation\` ADD \`level\` int NULL COMMENT 'ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileEducation\` DROP COLUMN \`level\``);
}
}