This commit is contained in:
Kittapath 2024-05-14 11:56:40 +07:00
parent b766112870
commit 35891a371a
2 changed files with 17 additions and 1 deletions

View file

@ -157,7 +157,7 @@ export class EducationLevelController extends Controller {
"createdFullName",
"lastUpdateFullName",
],
order: { createdAt: "ASC" },
order: { rank: "ASC" },
});
// if (!educationLevel) {

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileemployeeAddPk51715662524792 implements MigrationInterface {
name = 'UpdateTableProfileemployeeAddPk51715662524792'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`profileEmployeeId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง ProfileEmployee'`);
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD CONSTRAINT \`FK_f5758428d496b6d2a051c8af92b\` FOREIGN KEY (\`profileEmployeeId\`) REFERENCES \`profileEmployee\`(\`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_f5758428d496b6d2a051c8af92b\``);
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`profileEmployeeId\``);
}
}