hrms-api-org/src/migration/1733798795372-update_table_add_field.ts
2024-12-10 09:49:41 +07:00

14 lines
589 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableAddField1733798795372 implements MigrationInterface {
name = 'UpdateTableAddField1733798795372'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`amountSpecial\``);
}
}