hrms-api-salary/src/migration/1711081845764-update_table_profileemployee_add_groupNew2.ts

14 lines
680 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileemployeeAddGroupNew21711081845764 implements MigrationInterface {
name = 'UpdateTableProfileemployeeAddGroupNew21711081845764'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`positionSalaryAmountPer\` double NOT NULL COMMENT 'เปอร์เซ็นเงินพิเศษ' DEFAULT '0'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`positionSalaryAmountPer\``);
}
}