From 5b096229c950d8b30d6bf9c77b58b35744a67223 Mon Sep 17 00:00:00 2001 From: Taras Dubyk Date: Wed, 24 Jul 2024 12:14:45 +0300 Subject: [PATCH] fix alter script generation with an empty index --- .../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)), );