diff --git a/src/migration/1710752446531-update_table_profile_history_add_is_date.ts b/src/migration/1710752446531-update_table_profile_history_add_is_date.ts new file mode 100644 index 00000000..bc408b1d --- /dev/null +++ b/src/migration/1710752446531-update_table_profile_history_add_is_date.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableProfileHistoryAddIsDate1710752446531 implements MigrationInterface { + name = 'UpdateTableProfileHistoryAddIsDate1710752446531' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` ADD \`isDate\` tinyint NULL COMMENT 'ประเภทช่วงเวลาการศึกษา'`); + await queryRunner.query(`ALTER TABLE \`profileTrainingHistory\` ADD \`isDate\` tinyint NULL COMMENT 'ประเภทช่วงเวลาการศึกษา'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileTrainingHistory\` DROP COLUMN \`isDate\``); + await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` DROP COLUMN \`isDate\``); + } + +}