แก้ชื่อฟิวผังเงินเดือนลูกจ้าง

This commit is contained in:
Kittapath 2024-03-13 11:25:07 +07:00
parent 3128103f3a
commit 5fc5b1bb06
7 changed files with 48 additions and 17 deletions

View file

@ -0,0 +1,20 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTypeStepTableSalaryEmployees1710302516943 implements MigrationInterface {
name = 'UpdateTypeStepTableSalaryEmployees1710302516943'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` CHANGE \`group\` \`step\` varchar(40) NOT NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
await queryRunner.query(`ALTER TABLE \`salaryRankEmployees\` CHANGE \`salaryMounth\` \`salaryMonth\` double NULL COMMENT 'ค่าจ้างรายเดือน'`);
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` DROP COLUMN \`step\``);
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` ADD \`step\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` DROP COLUMN \`step\``);
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` ADD \`step\` varchar(40) NOT NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
await queryRunner.query(`ALTER TABLE \`salaryRankEmployees\` CHANGE \`salaryMonth\` \`salaryMounth\` double NULL COMMENT 'ค่าจ้างรายเดือน'`);
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` CHANGE \`step\` \`group\` varchar(40) NOT NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
}
}

View file

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