add fields
This commit is contained in:
parent
97f1fc0a98
commit
35fb72e45d
4 changed files with 46 additions and 0 deletions
|
|
@ -67,6 +67,14 @@ export class CommandRecive extends EntityBase {
|
|||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินพิเศษ",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
amountSpecial: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินประจำตำแหน่ง",
|
||||
default: 0,
|
||||
|
|
|
|||
|
|
@ -339,6 +339,14 @@ export class Profile extends EntityBase {
|
|||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินพิเศษ",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
amountSpecial: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินประจำตำแหน่ง",
|
||||
default: 0,
|
||||
|
|
|
|||
|
|
@ -592,6 +592,14 @@ export class ProfileEmployee extends EntityBase {
|
|||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินพิเศษ",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
amountSpecial: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินประจำตำแหน่ง",
|
||||
default: 0,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class Update3table_addAmountSpecial1733471256767 implements MigrationInterface {
|
||||
name = 'Update3table_addAmountSpecial1733471256767'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`amountSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`amountSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`amountSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`amountSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`amountSpecial\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue