เพิ่มเวลาลูกจ้าง

This commit is contained in:
kittapath 2024-11-07 15:55:23 +07:00
parent b1c365a4da
commit 2c1e1dd8ff
9 changed files with 390 additions and 244 deletions

View file

@ -0,0 +1,20 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileempAddDutyTimeId1730964715891 implements MigrationInterface {
name = 'UpdateTableProfileempAddDutyTimeId1730964715891'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`dutyTimeId\` varchar(40) NULL COMMENT 'ไอดีรอบลงเวลาล่าสุด'`);
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`dutyTimeEffectiveDate\` datetime NULL COMMENT 'รอบลงเวลาล่าสุด'`);
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`dutyTimeId\` varchar(40) NULL COMMENT 'ไอดีรอบลงเวลาล่าสุด'`);
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`dutyTimeEffectiveDate\` datetime NULL COMMENT 'รอบลงเวลาล่าสุด'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`dutyTimeEffectiveDate\``);
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`dutyTimeId\``);
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`dutyTimeEffectiveDate\``);
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`dutyTimeId\``);
}
}