migration profileSalaryHistory

This commit is contained in:
Bright 2024-12-10 09:49:41 +07:00
parent da6c407678
commit d29a4a4747
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,14 @@
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\``);
}
}