Merge branch 'develop' into develop-Bright
This commit is contained in:
commit
03ba1cda5e
4 changed files with 47 additions and 1 deletions
|
|
@ -157,7 +157,7 @@ export class EducationLevelController extends Controller {
|
|||
"createdFullName",
|
||||
"lastUpdateFullName",
|
||||
],
|
||||
order: { createdAt: "ASC" },
|
||||
order: { rank: "ASC" },
|
||||
});
|
||||
|
||||
// if (!educationLevel) {
|
||||
|
|
|
|||
|
|
@ -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\``);
|
||||
}
|
||||
|
||||
}
|
||||
14
src/migration/1715662934173-update_table_node_add_duty.ts
Normal file
14
src/migration/1715662934173-update_table_node_add_duty.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableNodeAddDuty1715662934173 implements MigrationInterface {
|
||||
name = 'UpdateTableNodeAddDuty1715662934173'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`orgRoot\` ADD \`duty\` varchar(255) NULL COMMENT 'หน้าที่ความรับผิดชอบ '`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`orgRoot\` DROP COLUMN \`duty\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableProfilegovAddEmployee1715663083281 implements MigrationInterface {
|
||||
name = 'UpdateTableProfilegovAddEmployee1715663083281'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileGovernment\` ADD \`profileEmployeeId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง ProfileEmployee'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileGovernment\` ADD CONSTRAINT \`FK_bac1952c24999f6576905b32a5a\` 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 \`profileGovernment\` DROP FOREIGN KEY \`FK_bac1952c24999f6576905b32a5a\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileGovernment\` DROP COLUMN \`profileEmployeeId\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue