Migration ฟิลด์ตาราง profileLeave, profileLeaveHistory & สร้างตาราง profileAbsentLate, profileEmployeeAbsentLate
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m52s

This commit is contained in:
harid 2026-03-23 15:36:54 +07:00
parent 41ad2a44e8
commit a76bda34b4
9 changed files with 706 additions and 0 deletions

View file

@ -0,0 +1,21 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileAbsentLate1774253766170 implements MigrationInterface {
name = 'UpdateTableProfileAbsentLate1774253766170'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileAbsentLate\` DROP COLUMN \`stampDate\``);
await queryRunner.query(`ALTER TABLE \`profileAbsentLate\` ADD \`stampDate\` datetime NOT NULL COMMENT 'วันที่และเวลาที่ลงเวลา'`);
await queryRunner.query(`ALTER TABLE \`profileEmployeeAbsentLate\` DROP COLUMN \`stampDate\``);
await queryRunner.query(`ALTER TABLE \`profileEmployeeAbsentLate\` ADD \`stampDate\` datetime NOT NULL COMMENT 'วันที่และเวลาที่ลงเวลา'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileEmployeeAbsentLate\` DROP COLUMN \`stampDate\``);
await queryRunner.query(`ALTER TABLE \`profileEmployeeAbsentLate\` ADD \`stampDate\` date NOT NULL COMMENT 'วันที่ลงเวลา'`);
await queryRunner.query(`ALTER TABLE \`profileAbsentLate\` DROP COLUMN \`stampDate\``);
await queryRunner.query(`ALTER TABLE \`profileAbsentLate\` ADD \`stampDate\` date NOT NULL COMMENT 'วันที่ลงเวลา'`);
}
}