migrate (add registryEmployee.employeeClass)
This commit is contained in:
parent
8079693f19
commit
bbb8eeb278
2 changed files with 24 additions and 1 deletions
|
|
@ -327,6 +327,14 @@ export class RegistryEmployee extends EntityBase {
|
|||
default: null,
|
||||
})
|
||||
fields: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทลูกจ้าง (perm->ลูกจ้างประจำ temp->ลูกจ้างชั่วคราว)",
|
||||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
employeeClass: string;
|
||||
}
|
||||
|
||||
export class RegistryEmployeeCreateDto {
|
||||
|
|
@ -340,7 +348,7 @@ export class RegistryEmployeeCreateDto {
|
|||
isRetirement?: boolean | null;
|
||||
leaveType?: string | null;
|
||||
posMasterNo?: string | null;
|
||||
// orgRootId?: string | null;
|
||||
orgRootId?: string | null;
|
||||
orgChild1Id?: string | null;
|
||||
orgChild2Id?: string | null;
|
||||
orgChild3Id?: string | null;
|
||||
|
|
@ -372,4 +380,5 @@ export class RegistryEmployeeCreateDto {
|
|||
Educations?: string | null;
|
||||
educationLevels?: string | null;
|
||||
fields?: string | null;
|
||||
employeeClass?: string | null;
|
||||
}
|
||||
|
|
@ -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\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue