no message
This commit is contained in:
parent
feb8da3947
commit
4676b62a6f
2 changed files with 20 additions and 0 deletions
|
|
@ -16,9 +16,11 @@ import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
|
||||||
@Entity("profileSalary")
|
@Entity("profileSalary")
|
||||||
export class ProfileSalary extends EntityBase {
|
export class ProfileSalary extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||||
type: "uuid",
|
type: "uuid",
|
||||||
|
default: null,
|
||||||
})
|
})
|
||||||
profileId: string;
|
profileId: string;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableProfileAvatarAddIsactive31715843317765 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableProfileAvatarAddIsactive31715843317765'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP FOREIGN KEY \`FK_7534d36579c78107ba08a96be6f\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` CHANGE \`profileId\` \`profileId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง profile'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD CONSTRAINT \`FK_7534d36579c78107ba08a96be6f\` 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 \`profileSalary\` DROP FOREIGN KEY \`FK_7534d36579c78107ba08a96be6f\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` CHANGE \`profileId\` \`profileId\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง profile'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD CONSTRAINT \`FK_7534d36579c78107ba08a96be6f\` FOREIGN KEY (\`profileId\`) REFERENCES \`profile\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue