migrate
This commit is contained in:
parent
fdc96d2e0f
commit
5c274cf916
1 changed files with 20 additions and 0 deletions
|
|
@ -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 'จุดเด่นของความประพฤติ'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue