From 0eb2065b3c721583712a9b02b5be715e6d1dc60c Mon Sep 17 00:00:00 2001 From: Taras Dubyk Date: Wed, 24 Jul 2024 12:33:22 +0300 Subject: [PATCH] fix alter script generation with an empty index (#110) --- .../alterScript/alterScriptHelpers/alterEntityHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forward_engineering/alterScript/alterScriptHelpers/alterEntityHelper.js b/forward_engineering/alterScript/alterScriptHelpers/alterEntityHelper.js index f96f737..ae71a94 100644 --- a/forward_engineering/alterScript/alterScriptHelpers/alterEntityHelper.js +++ b/forward_engineering/alterScript/alterScriptHelpers/alterEntityHelper.js @@ -167,7 +167,7 @@ const getNewlyCreatedIndexesScripts = ({ _, ddlProvider, dbVersion, collection } return []; } - const doAnyIndexUseNewlyCreatedColumn = newIndexes.some(({ columns }) => + const doAnyIndexUseNewlyCreatedColumn = newIndexes.some(({ columns = [] }) => columns.find(({ keyId }) => propertiesIds.includes(keyId)), );