no message
This commit is contained in:
parent
bb3e8b435b
commit
0d9d963b66
2 changed files with 19 additions and 5 deletions
|
|
@ -6,12 +6,10 @@ import { EmployeePosType } from "./EmployeePosType";
|
|||
@Entity("employeePosLevel")
|
||||
export class EmployeePosLevel extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อระดับชั้นงาน",
|
||||
length: 255,
|
||||
default: null,
|
||||
type: "int",
|
||||
})
|
||||
posLevelName: string;
|
||||
posLevelName: number;
|
||||
|
||||
@Column({
|
||||
comment: "ระดับของระดับชั้นงาน",
|
||||
|
|
@ -36,7 +34,7 @@ export class EmployeePosLevel extends EntityBase {
|
|||
|
||||
export class CreateEmployeePosLevel {
|
||||
@Column()
|
||||
posLevelName: string;
|
||||
posLevelName: number;
|
||||
|
||||
@Column()
|
||||
posLevelRank: number;
|
||||
|
|
|
|||
16
src/migration/1710220658926-edit_type_empPosLevel.ts
Normal file
16
src/migration/1710220658926-edit_type_empPosLevel.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class EditTypeEmpPosLevel1710220658926 implements MigrationInterface {
|
||||
name = 'EditTypeEmpPosLevel1710220658926'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`employeePosLevel\` DROP COLUMN \`posLevelName\``);
|
||||
await queryRunner.query(`ALTER TABLE \`employeePosLevel\` ADD \`posLevelName\` int NOT NULL COMMENT 'ชื่อระดับชั้นงาน'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`employeePosLevel\` DROP COLUMN \`posLevelName\``);
|
||||
await queryRunner.query(`ALTER TABLE \`employeePosLevel\` ADD \`posLevelName\` varchar(255) NULL COMMENT 'ชื่อระดับชั้นงาน'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue