migration profileSalaryHistory
This commit is contained in:
parent
da6c407678
commit
d29a4a4747
2 changed files with 24 additions and 0 deletions
|
|
@ -83,6 +83,14 @@ export class ProfileSalaryHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
amount: Double;
|
amount: Double;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
comment: "เงินพิเศษ",
|
||||||
|
default: 0,
|
||||||
|
nullable: true,
|
||||||
|
type: "double",
|
||||||
|
})
|
||||||
|
amountSpecial: Double;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "เงินประจำตำแหน่ง",
|
comment: "เงินประจำตำแหน่ง",
|
||||||
default: 0,
|
default: 0,
|
||||||
|
|
@ -149,6 +157,7 @@ export class CreateProfileSalaryHistory {
|
||||||
profileId: string;
|
profileId: string;
|
||||||
date?: Date | null;
|
date?: Date | null;
|
||||||
amount?: Double | null;
|
amount?: Double | null;
|
||||||
|
amountSpecial?: Double | null;
|
||||||
positionSalaryAmount?: Double | null;
|
positionSalaryAmount?: Double | null;
|
||||||
mouthSalaryAmount?: Double | null;
|
mouthSalaryAmount?: Double | null;
|
||||||
posNo: string | null;
|
posNo: string | null;
|
||||||
|
|
@ -165,6 +174,7 @@ export class CreateProfileSalaryHistory {
|
||||||
export class UpdateProfileSalaryHistory {
|
export class UpdateProfileSalaryHistory {
|
||||||
date?: Date | null;
|
date?: Date | null;
|
||||||
amount?: Double | null;
|
amount?: Double | null;
|
||||||
|
amountSpecial?: Double | null;
|
||||||
positionSalaryAmount?: Double | null;
|
positionSalaryAmount?: Double | null;
|
||||||
mouthSalaryAmount?: Double | null;
|
mouthSalaryAmount?: Double | null;
|
||||||
posNo?: string | null;
|
posNo?: string | null;
|
||||||
|
|
|
||||||
14
src/migration/1733798795372-update_table_add_field.ts
Normal file
14
src/migration/1733798795372-update_table_add_field.ts
Normal 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\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue