diff --git a/src/entities/ProfileSalaryHistory.ts b/src/entities/ProfileSalaryHistory.ts index b1101d07..28785f60 100644 --- a/src/entities/ProfileSalaryHistory.ts +++ b/src/entities/ProfileSalaryHistory.ts @@ -14,12 +14,12 @@ import { ProfileSalary } from "./ProfileSalary"; @Entity("profileSalaryHistory") export class ProfileSalaryHistory extends EntityBase { - @Column({ - length: 40, - comment: "คีย์นอก(FK)ของตาราง profile", - type: "uuid", - }) - profileId: string; + // @Column({ + // length: 40, + // comment: "คีย์นอก(FK)ของตาราง profile", + // type: "uuid", + // }) + // profileId: string; @Column({ comment: "วันที่", diff --git a/src/migration/1715913482491-update_table_ProfileSalaryHistory_delete_profileId.ts b/src/migration/1715913482491-update_table_ProfileSalaryHistory_delete_profileId.ts new file mode 100644 index 00000000..6aa2a1f5 --- /dev/null +++ b/src/migration/1715913482491-update_table_ProfileSalaryHistory_delete_profileId.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableProfileSalaryHistoryDeleteProfileId1715913482491 implements MigrationInterface { + name = 'UpdateTableProfileSalaryHistoryDeleteProfileId1715913482491' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`profileId\``); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`profileId\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง profile'`); + } + +}