This commit is contained in:
Bright 2025-02-24 17:31:03 +07:00
parent c8fcfebe97
commit 438e164fcb
2 changed files with 21 additions and 1 deletions

View file

@ -242,7 +242,7 @@ export class ProfileSalary extends EntityBase {
}
export class CreateProfileSalary {
profileId: string;
profileId: string | null;
commandDateAffect?: Date | null;
commandDateSign?: Date | null;
amount?: Double | null;

View file

@ -0,0 +1,20 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateProfileSalary1740392430192 implements MigrationInterface {
name = 'UpdateProfileSalary1740392430192'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`commandNo\``);
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`commandNo\` varchar(255) NULL COMMENT 'เลขที่คำสั่ง'`);
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`commandNo\``);
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`commandNo\` varchar(255) NULL COMMENT 'เลขที่คำสั่ง'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`commandNo\``);
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`commandNo\` int NULL COMMENT 'เลขที่คำสั่ง'`);
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`commandNo\``);
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`commandNo\` int NULL COMMENT 'เลขที่คำสั่ง'`);
}
}