แก้ฟิว

This commit is contained in:
kittapath 2024-10-01 10:30:03 +07:00
parent a23ccd9bd7
commit 5643cc67c4
3 changed files with 80 additions and 47 deletions

View file

@ -0,0 +1,24 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateProfileDevelopment1727752118300 implements MigrationInterface {
name = 'UpdateProfileDevelopment1727752118300'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` DROP COLUMN \`point\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` DROP COLUMN \`summary\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` DROP COLUMN \`target\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` DROP COLUMN \`point\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` DROP COLUMN \`summary\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` DROP COLUMN \`target\``);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` ADD \`target\` varchar(255) NULL COMMENT 'เป้าหมาย'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` ADD \`summary\` double NULL COMMENT 'ผลการประเมิน'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` ADD \`point\` int NULL COMMENT 'ระดับคะแนน'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` ADD \`target\` varchar(255) NULL COMMENT 'เป้าหมาย'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` ADD \`summary\` double NULL COMMENT 'ผลการประเมิน'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` ADD \`point\` int NULL COMMENT 'ระดับคะแนน'`);
}
}