feat: add migration
This commit is contained in:
parent
b53078016d
commit
c264558a2c
1 changed files with 16 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableProfileHistoryAddIsDate1710752446531 implements MigrationInterface {
|
||||
name = 'UpdateTableProfileHistoryAddIsDate1710752446531'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
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<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileTrainingHistory\` DROP COLUMN \`isDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` DROP COLUMN \`isDate\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue