migrate db profie
This commit is contained in:
parent
a94316e781
commit
637a01deab
3 changed files with 232 additions and 123 deletions
|
|
@ -1,6 +1,15 @@
|
|||
import { Entity, Column, OneToMany, OneToOne, JoinColumn, ManyToMany, ManyToOne, Double } from "typeorm";
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
OneToMany,
|
||||
OneToOne,
|
||||
JoinColumn,
|
||||
ManyToMany,
|
||||
ManyToOne,
|
||||
Double,
|
||||
} from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Profile } from "./Profile" ;
|
||||
import { Profile } from "./Profile";
|
||||
import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
|
||||
|
||||
@Entity("profileSalary")
|
||||
|
|
@ -16,7 +25,7 @@ export class ProfileSalary extends EntityBase {
|
|||
comment: "เงินเดือนฐาน",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
|
|
@ -24,7 +33,7 @@ export class ProfileSalary extends EntityBase {
|
|||
comment: "เงินประจำตำแหน่ง",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
|
|
@ -32,14 +41,14 @@ export class ProfileSalary extends EntityBase {
|
|||
comment: "เงินค่าตอบแทนรายเดือน",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||
type: "uuid"
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
|
|
@ -99,7 +108,7 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionExecutiveId : string;
|
||||
positionExecutiveId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -108,7 +117,7 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionExecutiveSideId : string;
|
||||
positionExecutiveSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -117,8 +126,8 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionLevelId : string;
|
||||
|
||||
positionLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -126,8 +135,8 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionLineId : string;
|
||||
|
||||
positionLineId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -135,8 +144,8 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionPathSideId : string;
|
||||
|
||||
positionPathSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -144,8 +153,8 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionTypeId : string;
|
||||
|
||||
positionTypeId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -153,8 +162,8 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
organizationShortNameId : string;
|
||||
|
||||
organizationShortNameId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -162,8 +171,8 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeeGroupId : string;
|
||||
|
||||
positionEmployeeGroupId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -171,8 +180,8 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeeLevelId : string;
|
||||
|
||||
positionEmployeeLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -180,8 +189,8 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeePositionId : string;
|
||||
|
||||
positionEmployeePositionId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -189,16 +198,15 @@ export class ProfileSalary extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeePositionSideId : string;
|
||||
positionEmployeePositionSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id เลขที่ตำแหน่งลูกจ้าง",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
posNoEmployee : string;
|
||||
posNoEmployee: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -249,33 +257,31 @@ export class ProfileSalary extends EntityBase {
|
|||
@ManyToOne(() => Profile, (profile) => profile.profileSalary)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
profile: Profile;
|
||||
|
||||
}
|
||||
|
||||
export class CreateProfileSalary {
|
||||
|
||||
@Column({
|
||||
type: "datetime"
|
||||
type: "datetime",
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
|
||||
@Column({
|
||||
type: "uuid"
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
|
|
@ -304,29 +310,29 @@ export class CreateProfileSalary {
|
|||
// positionExecutiveSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLineId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionPathSideId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionTypeId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// organizationShortNameId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeGroupId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeLevelId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionSideId : string | null;
|
||||
|
||||
|
|
@ -350,32 +356,30 @@ export class CreateProfileSalary {
|
|||
|
||||
// @Column()
|
||||
// salaryStatus: string | null;
|
||||
|
||||
}
|
||||
|
||||
export class UpdateProfileSalary {
|
||||
|
||||
@Column({
|
||||
type: "datetime"
|
||||
type: "datetime",
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
// @Column()
|
||||
// @Column()
|
||||
// isActive: boolean;
|
||||
|
||||
// @Column()
|
||||
|
|
@ -400,29 +404,29 @@ export class UpdateProfileSalary {
|
|||
// positionExecutiveSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLineId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionPathSideId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionTypeId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// organizationShortNameId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeGroupId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeLevelId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionSideId : string | null;
|
||||
|
||||
|
|
@ -446,6 +450,4 @@ export class UpdateProfileSalary {
|
|||
|
||||
// @Column()
|
||||
// salaryStatus: string | null;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
import { Entity, Column, OneToMany, OneToOne, JoinColumn, ManyToMany, ManyToOne, Double } from "typeorm";
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
OneToMany,
|
||||
OneToOne,
|
||||
JoinColumn,
|
||||
ManyToMany,
|
||||
ManyToOne,
|
||||
Double,
|
||||
} from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Profile } from "./Profile" ;
|
||||
import { Profile } from "./Profile";
|
||||
import { ProfileSalary } from "./ProfileSalary";
|
||||
|
||||
@Entity("profileSalaryHistory")
|
||||
|
|
@ -16,7 +25,7 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
comment: "เงินเดือนฐาน",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
|
|
@ -24,7 +33,7 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
comment: "เงินประจำตำแหน่ง",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
|
|
@ -32,14 +41,14 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
comment: "เงินค่าตอบแทนรายเดือน",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||
type: "uuid"
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
|
|
@ -99,7 +108,7 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionExecutiveId : string;
|
||||
positionExecutiveId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -108,7 +117,7 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionExecutiveSideId : string;
|
||||
positionExecutiveSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -117,8 +126,8 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionLevelId : string;
|
||||
|
||||
positionLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -126,8 +135,8 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionLineId : string;
|
||||
|
||||
positionLineId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -135,8 +144,8 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionPathSideId : string;
|
||||
|
||||
positionPathSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -144,8 +153,8 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionTypeId : string;
|
||||
|
||||
positionTypeId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -153,8 +162,8 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
organizationShortNameId : string;
|
||||
|
||||
organizationShortNameId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -162,8 +171,8 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeeGroupId : string;
|
||||
|
||||
positionEmployeeGroupId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -171,8 +180,8 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeeLevelId : string;
|
||||
|
||||
positionEmployeeLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -180,8 +189,8 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeePositionId : string;
|
||||
|
||||
positionEmployeePositionId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
@ -189,16 +198,15 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeePositionSideId : string;
|
||||
positionEmployeePositionSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id เลขที่ตำแหน่งลูกจ้าง",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
posNoEmployee : string;
|
||||
posNoEmployee: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -249,29 +257,28 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
}
|
||||
|
||||
export class CreateProfileSalaryHistory {
|
||||
|
||||
@Column({
|
||||
type: "datetime"
|
||||
type: "datetime",
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
|
||||
@Column({
|
||||
type: "uuid"
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
|
|
@ -300,29 +307,29 @@ export class CreateProfileSalaryHistory {
|
|||
// positionExecutiveSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLineId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionPathSideId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionTypeId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// organizationShortNameId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeGroupId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeLevelId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionSideId : string | null;
|
||||
|
||||
|
|
@ -346,32 +353,30 @@ export class CreateProfileSalaryHistory {
|
|||
|
||||
// @Column()
|
||||
// salaryStatus: string | null;
|
||||
|
||||
}
|
||||
|
||||
export class UpdateProfileSalaryHistory {
|
||||
|
||||
@Column({
|
||||
type: "datetime"
|
||||
type: "datetime",
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double"
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
// @Column()
|
||||
// @Column()
|
||||
// isActive: boolean;
|
||||
|
||||
// @Column()
|
||||
|
|
@ -396,29 +401,29 @@ export class UpdateProfileSalaryHistory {
|
|||
// positionExecutiveSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLineId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionPathSideId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionTypeId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// organizationShortNameId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeGroupId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeLevelId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionId : string | null;
|
||||
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionSideId : string | null;
|
||||
|
||||
|
|
@ -442,6 +447,4 @@ export class UpdateProfileSalaryHistory {
|
|||
|
||||
// @Column()
|
||||
// salaryStatus: string | null;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
104
src/migration/1710301899335-add_table_profileSalaryhis.ts
Normal file
104
src/migration/1710301899335-add_table_profileSalaryhis.ts
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddTableProfileSalaryhis1710301899335 implements MigrationInterface {
|
||||
name = 'AddTableProfileSalaryhis1710301899335'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE TABLE \`profileSalaryHistory\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`date\` datetime NULL COMMENT 'วันที่', \`amount\` double NULL COMMENT 'เงินเดือนฐาน' DEFAULT '0', \`positionSalaryAmount\` double NULL COMMENT 'เงินประจำตำแหน่ง' DEFAULT '0', \`mouthSalaryAmount\` double NULL COMMENT 'เงินค่าตอบแทนรายเดือน' DEFAULT '0', \`profileId\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง profile', \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0, \`salaryClass\` text NULL COMMENT 'ตำแหน่ง (รายละเอียด)', \`salaryRef\` text NULL COMMENT 'เอกสารอ้างอิง', \`posNoId\` varchar(40) NULL COMMENT 'Id เลขที่ตำแหน่ง', \`positionId\` varchar(40) NULL COMMENT 'Id เลขที่ตำแหน่ง', \`ocId\` varchar(40) NULL COMMENT 'Id สังกัด', \`positionExecutiveId\` varchar(40) NULL COMMENT 'Id ตำแหน่งทางการบริหาร', \`positionExecutiveSideId\` varchar(40) NULL COMMENT 'Id ด้านทางการบริหาร', \`positionLevelId\` varchar(40) NULL, \`positionLineId\` varchar(40) NULL COMMENT 'Id สายงาน', \`positionPathSideId\` varchar(40) NULL COMMENT 'Id ด้าน/สาขา', \`positionTypeId\` varchar(40) NULL COMMENT 'Id ประเภทตำแหน่ง', \`organizationShortNameId\` varchar(40) NULL COMMENT 'Id ชื่อย่อหน่วยงาน', \`positionEmployeeGroupId\` varchar(40) NULL COMMENT 'Id กลุ่มงาน', \`positionEmployeeLevelId\` varchar(40) NULL COMMENT 'Id ระดับชั้นงาน', \`positionEmployeePositionId\` varchar(40) NULL COMMENT 'Id ตำแหน่ง', \`positionEmployeePositionSideId\` varchar(40) NULL COMMENT 'Id ด้านของตำแหน่ง', \`posNoEmployee\` varchar(40) NULL COMMENT 'Id เลขที่ตำแหน่งลูกจ้าง', \`refCommandDate\` datetime NULL COMMENT 'เอกสารอ้างอิง (ลงวันที่)', \`refCommandNo\` text NULL COMMENT 'เอกสารอ้างอิง (เลขที่คำสั่ง)', \`order\` int NULL COMMENT 'ลำดับ', \`commandNo\` text NOT NULL COMMENT 'เลขที่คำสั่ง', \`commandTypeName\` text NOT NULL COMMENT 'ประเภทคำสั่ง', \`salaryStatus\` text NULL COMMENT 'ประเภทตำแหน่งกรณีพิเศษ', \`profileSalaryId\` varchar(36) NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`profileDisciplineHistory\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`date\` datetime NULL COMMENT 'วันที่', \`profileDisciplineId\` varchar(40) NOT NULL COMMENT 'ล้างมลทิน', \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0, \`level\` text NULL COMMENT 'ระดับความผิด', \`detail\` text NULL COMMENT 'รายละเอียด', \`refCommandDate\` datetime NULL COMMENT 'เอกสารอ้างอิง (ลงวันที่)', \`refCommandNo\` text NULL COMMENT 'เอกสารอ้างอิง (เลขที่คำสั่ง)', \`unStigma\` text NULL COMMENT 'ล้างมลทิน', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`profileDutyHistory\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0, \`dateStart\` datetime NULL COMMENT 'เริ่มต้น', \`dateEnd\` datetime NULL COMMENT 'สิ้นสุด', \`detail\` text NULL COMMENT 'รายละเอียด', \`reference\` text NULL COMMENT 'เอกสารอ้างอิง', \`refCommandDate\` datetime NULL COMMENT 'เอกสารอ้างอิง (ลงวันที่)', \`refCommandNo\` text NULL COMMENT 'เอกสารอ้างอิง (เลขที่คำสั่ง)', \`profileDutyId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง ProfileDuty', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`profileDuty\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`profileId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง Profile', \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0, \`dateStart\` datetime NULL COMMENT 'เริ่มต้น', \`dateEnd\` datetime NULL COMMENT 'สิ้นสุด', \`detail\` text NULL COMMENT 'รายละเอียด', \`reference\` text NULL COMMENT 'เอกสารอ้างอิง', \`refCommandDate\` datetime NULL COMMENT 'เอกสารอ้างอิง (ลงวันที่)', \`refCommandNo\` text NULL COMMENT 'เอกสารอ้างอิง (เลขที่คำสั่ง)', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`profileNopaidHistory\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0, \`date\` datetime NULL COMMENT 'วัน เดือน ปี', \`detail\` text NULL COMMENT 'รายละเอียด', \`reference\` text NULL COMMENT 'เอกสารอ้างอิง', \`refCommandDate\` datetime NULL COMMENT 'เอกสารอ้างอิง (ลงวันที่)', \`refCommandNo\` text NULL COMMENT 'เอกสารอ้างอิง (เลขที่คำสั่ง)', \`profileNopaidId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง ProfileNopaid', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`profileNopaid\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`profileId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง Profile', \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0, \`date\` datetime NULL COMMENT 'วัน เดือน ปี', \`detail\` text NULL COMMENT 'รายละเอียด', \`reference\` text NULL COMMENT 'เอกสารอ้างอิง', \`refCommandDate\` datetime NULL COMMENT 'เอกสารอ้างอิง (ลงวันที่)', \`refCommandNo\` text NULL COMMENT 'เอกสารอ้างอิง (เลขที่คำสั่ง)', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`profileOtherHistory\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`profileId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง Profile', \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0, \`detail\` text NULL COMMENT 'รายละเอียด', \`date\` datetime NULL COMMENT 'วันที่', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`profileOther\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`profileId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง Profile', \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0, \`detail\` text NULL COMMENT 'รายละเอียด', \`date\` datetime NULL COMMENT 'วันที่', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`salaryClass\` text NULL COMMENT 'ตำแหน่ง (รายละเอียด)'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`salaryRef\` text NULL COMMENT 'เอกสารอ้างอิง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`posNoId\` varchar(40) NULL COMMENT 'Id เลขที่ตำแหน่ง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionId\` varchar(40) NULL COMMENT 'Id เลขที่ตำแหน่ง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`ocId\` varchar(40) NULL COMMENT 'Id สังกัด'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionExecutiveId\` varchar(40) NULL COMMENT 'Id ตำแหน่งทางการบริหาร'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionExecutiveSideId\` varchar(40) NULL COMMENT 'Id ด้านทางการบริหาร'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionLevelId\` varchar(40) NULL`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionLineId\` varchar(40) NULL COMMENT 'Id สายงาน'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionPathSideId\` varchar(40) NULL COMMENT 'Id ด้าน/สาขา'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionTypeId\` varchar(40) NULL COMMENT 'Id ประเภทตำแหน่ง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`organizationShortNameId\` varchar(40) NULL COMMENT 'Id ชื่อย่อหน่วยงาน'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionEmployeeGroupId\` varchar(40) NULL COMMENT 'Id กลุ่มงาน'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionEmployeeLevelId\` varchar(40) NULL COMMENT 'Id ระดับชั้นงาน'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionEmployeePositionId\` varchar(40) NULL COMMENT 'Id ตำแหน่ง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`positionEmployeePositionSideId\` varchar(40) NULL COMMENT 'Id ด้านของตำแหน่ง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`posNoEmployee\` varchar(40) NULL COMMENT 'Id เลขที่ตำแหน่งลูกจ้าง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`refCommandDate\` datetime NULL COMMENT 'เอกสารอ้างอิง (ลงวันที่)'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`refCommandNo\` text NULL COMMENT 'เอกสารอ้างอิง (เลขที่คำสั่ง)'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`order\` int NULL COMMENT 'ลำดับ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`commandNo\` text NOT NULL COMMENT 'เลขที่คำสั่ง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`commandTypeName\` text NOT NULL COMMENT 'ประเภทคำสั่ง'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`salaryStatus\` text NULL COMMENT 'ประเภทตำแหน่งกรณีพิเศษ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` ADD \`isActive\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` ADD \`level\` text NULL COMMENT 'ระดับความผิด'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` ADD \`detail\` text NULL COMMENT 'รายละเอียด'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` ADD \`refCommandDate\` datetime NULL COMMENT 'เอกสารอ้างอิง (ลงวันที่)'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` ADD \`refCommandNo\` text NULL COMMENT 'เอกสารอ้างอิง (เลขที่คำสั่ง)'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` ADD \`unStigma\` text NULL COMMENT 'ล้างมลทิน'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD CONSTRAINT \`FK_f1ded3e1f83ab2437f739a14f38\` FOREIGN KEY (\`profileSalaryId\`) REFERENCES \`profileSalary\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDisciplineHistory\` ADD CONSTRAINT \`FK_5800d4d8fdfd3fd58d1e9085f88\` FOREIGN KEY (\`profileDisciplineId\`) REFERENCES \`profileDiscipline\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDutyHistory\` ADD CONSTRAINT \`FK_cbd922448bdf0c4fc96a2837d4f\` FOREIGN KEY (\`profileDutyId\`) REFERENCES \`profileDuty\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDuty\` ADD CONSTRAINT \`FK_7f5aa961bf71d86d8807aa8be4d\` FOREIGN KEY (\`profileId\`) REFERENCES \`profile\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileNopaidHistory\` ADD CONSTRAINT \`FK_c2b83aa33f3679e48b6bd521170\` FOREIGN KEY (\`profileNopaidId\`) REFERENCES \`profileNopaid\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileNopaid\` ADD CONSTRAINT \`FK_7b79e20b066ed08f3a85fd0fafa\` FOREIGN KEY (\`profileId\`) REFERENCES \`profile\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileOtherHistory\` ADD CONSTRAINT \`FK_3b1d1d213fd87c951ba518b8fbc\` FOREIGN KEY (\`profileId\`) REFERENCES \`profileOther\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileOther\` ADD CONSTRAINT \`FK_54fb3d8f5aaf823450209bacdc3\` FOREIGN KEY (\`profileId\`) REFERENCES \`profile\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileOther\` DROP FOREIGN KEY \`FK_54fb3d8f5aaf823450209bacdc3\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileOtherHistory\` DROP FOREIGN KEY \`FK_3b1d1d213fd87c951ba518b8fbc\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileNopaid\` DROP FOREIGN KEY \`FK_7b79e20b066ed08f3a85fd0fafa\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileNopaidHistory\` DROP FOREIGN KEY \`FK_c2b83aa33f3679e48b6bd521170\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDuty\` DROP FOREIGN KEY \`FK_7f5aa961bf71d86d8807aa8be4d\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDutyHistory\` DROP FOREIGN KEY \`FK_cbd922448bdf0c4fc96a2837d4f\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDisciplineHistory\` DROP FOREIGN KEY \`FK_5800d4d8fdfd3fd58d1e9085f88\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP FOREIGN KEY \`FK_f1ded3e1f83ab2437f739a14f38\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` DROP COLUMN \`unStigma\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` DROP COLUMN \`refCommandNo\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` DROP COLUMN \`refCommandDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` DROP COLUMN \`detail\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` DROP COLUMN \`level\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileDiscipline\` DROP COLUMN \`isActive\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`salaryStatus\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`commandTypeName\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`commandNo\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`refCommandNo\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`refCommandDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`posNoEmployee\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionEmployeePositionSideId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionEmployeePositionId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionEmployeeLevelId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionEmployeeGroupId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`organizationShortNameId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionTypeId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionPathSideId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionLineId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionLevelId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionExecutiveSideId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionExecutiveId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`ocId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`positionId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`posNoId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`salaryRef\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`salaryClass\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`isActive\``);
|
||||
await queryRunner.query(`DROP TABLE \`profileOther\``);
|
||||
await queryRunner.query(`DROP TABLE \`profileOtherHistory\``);
|
||||
await queryRunner.query(`DROP TABLE \`profileNopaid\``);
|
||||
await queryRunner.query(`DROP TABLE \`profileNopaidHistory\``);
|
||||
await queryRunner.query(`DROP TABLE \`profileDuty\``);
|
||||
await queryRunner.query(`DROP TABLE \`profileDutyHistory\``);
|
||||
await queryRunner.query(`DROP TABLE \`profileDisciplineHistory\``);
|
||||
await queryRunner.query(`DROP TABLE \`profileSalaryHistory\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue