hrms-api-org/src/migration/1708590016918-update_table_profile_add_probation.ts
2024-02-22 15:44:40 +07:00

14 lines
614 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileAddProbation1708590016918 implements MigrationInterface {
name = 'UpdateTableProfileAddProbation1708590016918'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`isProbation\` tinyint NOT NULL COMMENT 'ทดลองปฏิบัติหน้าที่' DEFAULT 0`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`isProbation\``);
}
}