สลับตำแหน่งเงินเดือน

This commit is contained in:
Kittapath 2024-03-28 11:44:16 +07:00
parent ab365257de
commit 021ee8cd6e
4 changed files with 74 additions and 1 deletions

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfilesalaryAddOrder1711599588075 implements MigrationInterface {
name = 'UpdateTableProfilesalaryAddOrder1711599588075'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`order\` int NULL COMMENT 'ลำดับตำแหน่ง'`);
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`order\` int NULL COMMENT 'ลำดับตำแหน่ง'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`order\``);
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`order\``);
}
}