migrate
This commit is contained in:
parent
067231d291
commit
056f40ab4c
2 changed files with 20 additions and 6 deletions
|
|
@ -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: "วันที่",
|
||||
|
|
|
|||
|
|
@ -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'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue