diff --git a/src/migration/1710749867773-update_table_profile_history_add_note.ts b/src/migration/1710749867773-update_table_profile_history_add_note.ts new file mode 100644 index 00000000..1d3cc342 --- /dev/null +++ b/src/migration/1710749867773-update_table_profile_history_add_note.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableProfileHistoryAddNote1710749867773 implements MigrationInterface { + name = 'UpdateTableProfileHistoryAddNote1710749867773' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileEducationHistory\` ADD \`note\` varchar(255) NULL COMMENT 'หมายเหตุ'`); + await queryRunner.query(`ALTER TABLE \`profileInsigniaHistory\` ADD \`note\` varchar(255) NULL COMMENT 'หมายเหตุ'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileInsigniaHistory\` DROP COLUMN \`note\``); + await queryRunner.query(`ALTER TABLE \`profileEducationHistory\` DROP COLUMN \`note\``); + } + +}