migrate (add registryEmployee.employeeClass)

This commit is contained in:
Bright 2025-08-28 14:14:37 +07:00
parent 8079693f19
commit bbb8eeb278
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateRegistrymployereAddFieldEmployeeClass1756364862810 implements MigrationInterface {
name = 'UpdateRegistrymployereAddFieldEmployeeClass1756364862810'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`registryEmployee\` ADD \`employeeClass\` varchar(40) NULL COMMENT 'ประเภทลูกจ้าง (perm->ลูกจ้างประจำ temp->ลูกจ้างชั่วคราว)'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`registryEmployee\` DROP COLUMN \`employeeClass\``);
}
}