profileemp add amount
This commit is contained in:
parent
1f7fa3160e
commit
b5384b6d46
2 changed files with 49 additions and 1 deletions
|
|
@ -0,0 +1,24 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdataTableProfileAddSalary11730774144012 implements MigrationInterface {
|
||||
name = 'UpdataTableProfileAddSalary11730774144012'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`amount\` double NULL COMMENT 'เงินเดือนฐาน' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`positionSalaryAmount\` double NULL COMMENT 'เงินประจำตำแหน่ง' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`mouthSalaryAmount\` double NULL COMMENT 'เงินค่าตอบแทนรายเดือน' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`amount\` double NULL COMMENT 'เงินเดือนฐาน' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`positionSalaryAmount\` double NULL COMMENT 'เงินประจำตำแหน่ง' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`mouthSalaryAmount\` double NULL COMMENT 'เงินค่าตอบแทนรายเดือน' DEFAULT '0'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`mouthSalaryAmount\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`positionSalaryAmount\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`amount\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`mouthSalaryAmount\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`positionSalaryAmount\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`amount\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue