Skip to content

Commit

Permalink
HCK-9419: remove restriction for generating script of pk keys if they…
Browse files Browse the repository at this point in the history
… are clustering keys (#249)
  • Loading branch information
serhii-filonenko authored Jan 10, 2025
1 parent 1824b8b commit 2db3fbf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions forward_engineering/helpers/keyHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ const getKeyNames = (tableData, jsonSchema, definitions) => {
);

const keysPaths = jsonSchemaHelper.getPathsByIds(ids, [jsonSchema, ...definitions]);
const primaryKeysPath = jsonSchemaHelper
.getPrimaryKeys(jsonSchema)
.filter(pkPath => !keysPaths.find(path => path[path.length - 1] === pkPath[pkPath.length - 1]));
const primaryKeysPath = jsonSchemaHelper.getPrimaryKeys(jsonSchema);
const idToNameHashTable = jsonSchemaHelper.getIdToNameHashTable([jsonSchema, ...definitions]);
const getNameByPath = jsonSchemaHelper.getNameByPath.bind(null, idToNameHashTable);

Expand Down

0 comments on commit 2db3fbf

Please sign in to comment.