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