16 lines
885 B
TypeScript
16 lines
885 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class UpdateTableEducationLeaveAddFields1764244579743 implements MigrationInterface {
|
|
name = 'UpdateTableEducationLeaveAddFields1764244579743'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`educationLevel\` ADD \`educationLevel\` varchar(50) NULL COMMENT 'ขีดจำกัดวุฒิการศึกษา'`);
|
|
await queryRunner.query(`ALTER TABLE \`educationLevel\` ADD \`isHigh\` tinyint NULL COMMENT 'วุฒิการศึกษาสูงสุด'`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`educationLevel\` DROP COLUMN \`isHigh\``);
|
|
await queryRunner.query(`ALTER TABLE \`educationLevel\` DROP COLUMN \`educationLevel\``);
|
|
}
|
|
|
|
}
|