เลื่อนเงินเดือนลูกจ้าง

This commit is contained in:
Kittapath 2024-03-21 22:59:53 +07:00
parent d3dd7012a1
commit 9449a1f989
7 changed files with 448 additions and 441 deletions

View file

@ -0,0 +1,20 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileemployeeAddGroupNew1711033284607 implements MigrationInterface {
name = 'UpdateTableProfileemployeeAddGroupNew1711033284607'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`salaryLevelNew\` double NULL COMMENT 'ขั้นเงินเดือน(ใหม่)'`);
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`group\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`groupNew\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง(ใหม่)'`);
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`positionSalaryDayAmount\` double NOT NULL COMMENT 'เงินเดือนหลังเลื่อน(รายวัน)' DEFAULT '0'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`positionSalaryDayAmount\``);
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`groupNew\``);
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`group\``);
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`salaryLevelNew\``);
}
}

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileemployeeAddGroupNew11711035132085 implements MigrationInterface {
name = 'UpdateTableProfileemployeeAddGroupNew11711035132085'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`group\``);
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`group\` double NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`group\``);
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`group\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
}
}