From 7c56b5f71b88675bd8f23e3f1221e0201634784c Mon Sep 17 00:00:00 2001 From: yevhenii-moroziuk Date: Wed, 4 Dec 2024 09:55:05 +0200 Subject: [PATCH] HCK-8971: include schema name in index name of DDL --- forward_engineering/helpers/indexHelper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forward_engineering/helpers/indexHelper.js b/forward_engineering/helpers/indexHelper.js index 09e4276..38abba5 100644 --- a/forward_engineering/helpers/indexHelper.js +++ b/forward_engineering/helpers/indexHelper.js @@ -159,7 +159,7 @@ module.exports = app => { return isParentActivated ? commentIfDeactivated(column, key) : column; }) .join(',\n\t'), - indexName: index.keyIndex, + indexName: getIndexName({ name: index.name, schemaName: index.schemaName }), catalog: catalog ? `ON ${catalog}\n` : '', options: options ? `WITH (\n\t${options}\n)` : '', terminator, @@ -212,7 +212,7 @@ module.exports = app => { const options = getSpatialOptions(index); return assignTemplates(templates.spatialIndex, { - name: index.name, + name: getIndexName({ name: index.name, schemaName: index.schemaName }), table: getTableName(tableName, index.schemaName), column: `[${index.column.name}]`, using: index.using ? `\nUSING ${index.using}` : '',