This commit is contained in:
AnandaTon 2024-05-17 09:43:58 +07:00
commit ef62099e92
2 changed files with 21 additions and 0 deletions

View file

@ -14,6 +14,13 @@ import { ProfileSalary } from "./ProfileSalary";
@Entity("profileSalaryHistory")
export class ProfileSalaryHistory extends EntityBase {
// @Column({
// length: 40,
// comment: "คีย์นอก(FK)ของตาราง profile",
// type: "uuid",
// })
// profileId: string;
@Column({
comment: "วันที่",
type: "datetime",

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'`);
}
}