This commit is contained in:
Kittapath 2024-05-17 09:41:02 +07:00
parent 067231d291
commit 056f40ab4c
2 changed files with 20 additions and 6 deletions

View file

@ -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: "วันที่",

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileSalaryHistoryDeleteProfileId1715913482491 implements MigrationInterface {
name = 'UpdateTableProfileSalaryHistoryDeleteProfileId1715913482491'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`profileId\``);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`profileId\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง profile'`);
}
}