From 7c01abeedfd275b8b08625e4bc4bece61130601b Mon Sep 17 00:00:00 2001 From: yevhenii-moroziuk Date: Thu, 5 Dec 2024 21:33:12 +0200 Subject: [PATCH] Reapply "HCK-8971: include schema name in index name of DDL (#40)" This reverts commit 3c1deddf85b2d93e5e262ba825ebba9e5ccc0b6b. --- .../ddlProvider/ddlHelpers/index/getIndexName.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/forward_engineering/ddlProvider/ddlHelpers/index/getIndexName.js b/forward_engineering/ddlProvider/ddlHelpers/index/getIndexName.js index 385df1d..fd2b896 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/index/getIndexName.js +++ b/forward_engineering/ddlProvider/ddlHelpers/index/getIndexName.js @@ -2,7 +2,9 @@ const { wrapInQuotes } = require('../../../utils/general'); const { getBasicValue } = require('../options/getOptionsByConfigs'); const getIndexName = ({ index }) => { - return getBasicValue({ prefix: ' ', modifier: name => wrapInQuotes({ name }) })(index.indxName); + const indexName = getBasicValue({ prefix: '', modifier: name => wrapInQuotes({ name }) })(index.indxName); + + return index.schemaName ? ` ${wrapInQuotes({ name: index.schemaName })}.${indexName}` : ` ${indexName}`; }; module.exports = {