This commit is contained in:
harid 2025-12-01 17:40:53 +07:00
parent fdc96d2e0f
commit 5c274cf916

View file

@ -0,0 +1,20 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateDatatypeEvaluateCommander1764585452499 implements MigrationInterface {
name = 'UpdateDatatypeEvaluateCommander1764585452499'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`evaluateCommander\` DROP COLUMN \`behavior_strength_desc\``);
await queryRunner.query(`ALTER TABLE \`evaluateCommander\` ADD \`behavior_strength_desc\` longtext NOT NULL COMMENT 'จุดเด่นของความประพฤติ'`);
await queryRunner.query(`ALTER TABLE \`evaluateCommander\` DROP COLUMN \`behavior_improve_desc\``);
await queryRunner.query(`ALTER TABLE \`evaluateCommander\` ADD \`behavior_improve_desc\` longtext NOT NULL COMMENT 'สิ่งที่ควรปรับปรุงของความประพฤติ'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`evaluateCommander\` DROP COLUMN \`behavior_improve_desc\``);
await queryRunner.query(`ALTER TABLE \`evaluateCommander\` ADD \`behavior_improve_desc\` varchar(255) NOT NULL COMMENT 'สิ่งที่ควรปรับปรุงของความประพฤติ'`);
await queryRunner.query(`ALTER TABLE \`evaluateCommander\` DROP COLUMN \`behavior_strength_desc\``);
await queryRunner.query(`ALTER TABLE \`evaluateCommander\` ADD \`behavior_strength_desc\` varchar(255) NOT NULL COMMENT 'จุดเด่นของความประพฤติ'`);
}
}