chore: add migration

This commit is contained in:
Methapon2001 2024-03-18 15:20:34 +07:00
parent 93c20a4c96
commit 340289a670

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileHistoryAddNote1710749867773 implements MigrationInterface {
name = 'UpdateTableProfileHistoryAddNote1710749867773'
public async up(queryRunner: QueryRunner): Promise<void> {
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<void> {
await queryRunner.query(`ALTER TABLE \`profileInsigniaHistory\` DROP COLUMN \`note\``);
await queryRunner.query(`ALTER TABLE \`profileEducationHistory\` DROP COLUMN \`note\``);
}
}