diff --git a/src/controllers/PositionController.ts b/src/controllers/PositionController.ts index 13929b56..6363562a 100644 --- a/src/controllers/PositionController.ts +++ b/src/controllers/PositionController.ts @@ -704,7 +704,7 @@ export class PositionController extends Controller { { ...checkChildConditions, ...typeCondition, - id: masterId.length > 0 ? In(masterId) : false, + // id: masterId.length > 0 ? In(masterId) : false, }, // { // ...checkChildConditions, diff --git a/src/migration/1707211501053-add_table_profile6.ts b/src/migration/1707211501053-add_table_profile6.ts new file mode 100644 index 00000000..36e33c46 --- /dev/null +++ b/src/migration/1707211501053-add_table_profile6.ts @@ -0,0 +1,20 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class AddTableProfile61707211501053 implements MigrationInterface { + name = 'AddTableProfile61707211501053' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`posMaster\` DROP FOREIGN KEY \`FK_9f765a0fef405dfafbd1b5f6c0a\``); + await queryRunner.query(`ALTER TABLE \`posMaster\` DROP FOREIGN KEY \`FK_22499e79738c6873fc7ede3f6dd\``); + await queryRunner.query(`ALTER TABLE \`posMaster\` ADD CONSTRAINT \`FK_9f765a0fef405dfafbd1b5f6c0a\` FOREIGN KEY (\`current_holderId\`) REFERENCES \`profile\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE \`posMaster\` ADD CONSTRAINT \`FK_22499e79738c6873fc7ede3f6dd\` FOREIGN KEY (\`next_holderId\`) REFERENCES \`profile\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`posMaster\` DROP FOREIGN KEY \`FK_22499e79738c6873fc7ede3f6dd\``); + await queryRunner.query(`ALTER TABLE \`posMaster\` DROP FOREIGN KEY \`FK_9f765a0fef405dfafbd1b5f6c0a\``); + await queryRunner.query(`ALTER TABLE \`posMaster\` ADD CONSTRAINT \`FK_22499e79738c6873fc7ede3f6dd\` FOREIGN KEY (\`next_holderId\`) REFERENCES \`posMaster\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`); + await queryRunner.query(`ALTER TABLE \`posMaster\` ADD CONSTRAINT \`FK_9f765a0fef405dfafbd1b5f6c0a\` FOREIGN KEY (\`current_holderId\`) REFERENCES \`posMaster\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`); + } + +}