From ceeb3f97a6ccfef0166ab392af17d399067f17dd Mon Sep 17 00:00:00 2001 From: ivan-m-dev Date: Mon, 2 Mar 2026 17:54:10 +0100 Subject: [PATCH 1/2] HCK-15041: add user warning modal --- .../model_level/modelLevelConfig.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/properties_pane/model_level/modelLevelConfig.json b/properties_pane/model_level/modelLevelConfig.json index dfeadc3..78884ad 100644 --- a/properties_pane/model_level/modelLevelConfig.json +++ b/properties_pane/model_level/modelLevelConfig.json @@ -113,7 +113,6 @@ making sure that you maintain a proper JSON format. } */ - [ { "lowerTab": "Details", @@ -171,6 +170,21 @@ making sure that you maintain a proper JSON format. ] }, "adapter": "adaptUnavailableTypes" + }, + { + "dependency": { + "type": "or", + "values": [ + { + "key": "dbVersion", + "value": "12c" + }, + { + "key": "dbVersion", + "value": "18c" + } + ] + } } ] }, From 49eff9620e5d6e6c9511b362dada1aa84885be71 Mon Sep 17 00:00:00 2001 From: ivan-m-dev Date: Tue, 3 Mar 2026 12:54:49 +0100 Subject: [PATCH 2/2] HCK-15041: refactor getAnnotationsString to remove dbVersion parameter --- .../dualityViewFeHelper/abstractDualityViewDdlCreator.js | 3 +-- .../ddlProvider/ddlHelpers/tableHelper.js | 2 +- forward_engineering/ddlProvider/ddlProvider.js | 9 ++++----- forward_engineering/utils/getAnnotationsString.js | 9 +-------- properties_pane/model_level/modelLevelConfig.json | 3 ++- 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/forward_engineering/ddlProvider/ddlHelpers/dualityViewFeHelper/abstractDualityViewDdlCreator.js b/forward_engineering/ddlProvider/ddlHelpers/dualityViewFeHelper/abstractDualityViewDdlCreator.js index 63bf73c..e385793 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/dualityViewFeHelper/abstractDualityViewDdlCreator.js +++ b/forward_engineering/ddlProvider/ddlHelpers/dualityViewFeHelper/abstractDualityViewDdlCreator.js @@ -183,14 +183,13 @@ class AbstractDualityViewFeDdlCreator { getCreateJsonRelationalDualityViewHeadingDdl(createViewDto, prepareName) { const { jsonSchema, view } = createViewDto; const template = this._ddlTemplates?.dualityView?.createJsonRelationalDualityViewHeading || ''; - const dbVersion = view?.modelInfo?.dbVersion || ''; const orReplaceStatement = this._getOrReplaceStatement(view); const forceStatement = this._getForceStatement(jsonSchema); const editionableStatement = this._getEditionableStatement(jsonSchema); const viewName = getViewName(view); const ddlViewName = this._getNamePrefixedWithSchemaName(viewName, view.schemaName); - const annotations = getAnnotationsString(prepareName, dbVersion)(view.viewAnnotations); + const annotations = getAnnotationsString(prepareName)(view.viewAnnotations); const params = { orReplaceStatement, diff --git a/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js b/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js index d8d9820..4a92249 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js +++ b/forward_engineering/ddlProvider/ddlHelpers/tableHelper.js @@ -29,7 +29,7 @@ module.exports = ({ getColumnsList, checkAllKeysDeactivated, commentIfDeactivate { key: 'partitioning', getValue: getPartitioning }, { key: 'selectStatement', getValue: getBasicValue('AS') }, { key: 'tableProperties', getValue: value => _.trim(value) }, - { key: 'tableAnnotations', getValue: getAnnotationsString(prepareName, tableData?.dbVersion) }, + { key: 'tableAnnotations', getValue: getAnnotationsString(prepareName) }, ] .map(config => (tableData[config.key] ? wrap(config.getValue(tableData[config.key], tableData)) : '')) .filter(Boolean) diff --git a/forward_engineering/ddlProvider/ddlProvider.js b/forward_engineering/ddlProvider/ddlProvider.js index 0fdbe9a..4b98152 100644 --- a/forward_engineering/ddlProvider/ddlProvider.js +++ b/forward_engineering/ddlProvider/ddlProvider.js @@ -143,7 +143,7 @@ module.exports = (baseProvider, options, app) => { const emptyLineSeparator = '\n\n'; const statementTerminator = ';'; - const annotations = getAnnotationsString(prepareName, dbVersion)(schemaAnnotations); + const annotations = getAnnotationsString(prepareName)(schemaAnnotations); const finalAnnotationsClause = annotations ? ' ' + annotations : ''; const preparedSchemaName = prepareName(schemaName); const usingTryCatchWrapper = shouldUseTryCatchIfNotExistsWrapper(dbVersion); @@ -228,7 +228,7 @@ module.exports = (baseProvider, options, app) => { convertColumnDefinition(columnDefinition, template = templates.columnDefinition) { const dbVersion = columnDefinition?.dbVersion; const type = replaceTypeByVersion(columnDefinition.type, dbVersion); - const annotations = getAnnotationsString(prepareName, dbVersion)(columnDefinition.columnAnnotations); + const annotations = getAnnotationsString(prepareName)(columnDefinition.columnAnnotations); const finalAnnotationsClause = annotations ? ' ' + annotations : ''; return commentIfDeactivated( @@ -485,7 +485,6 @@ module.exports = (baseProvider, options, app) => { selectStatement, tableProperties, tableAnnotations, - dbVersion, }), }); if (usingTryCatchWrapper) { @@ -516,7 +515,7 @@ module.exports = (baseProvider, options, app) => { const dbVersion = options.dbVersion || ''; const usingTryCatchWrapper = shouldUseTryCatchIfNotExistsWrapper(dbVersion); - const annotations = getAnnotationsString(prepareName, dbVersion)(index.indexAnnotations); + const annotations = getAnnotationsString(prepareName)(index.indexAnnotations); const finalAnnotationsClause = annotations ? ' ' + annotations : ''; const shouldInsertIfNotExistsStatement = index.ifNotExist && !usingTryCatchWrapper; @@ -670,7 +669,7 @@ module.exports = (baseProvider, options, app) => { const dbVersion = _.get(viewData, 'modelInfo.dbVersion', ''); const usingTryCatchWrapper = shouldUseTryCatchIfNotExistsWrapper(dbVersion); - const annotations = getAnnotationsString(prepareName, dbVersion)(viewData.viewAnnotations); + const annotations = getAnnotationsString(prepareName)(viewData.viewAnnotations); let createViewDdl = assignTemplates(templates.createView, { name: viewName, diff --git a/forward_engineering/utils/getAnnotationsString.js b/forward_engineering/utils/getAnnotationsString.js index c0fd6cc..1d5e615 100644 --- a/forward_engineering/utils/getAnnotationsString.js +++ b/forward_engineering/utils/getAnnotationsString.js @@ -7,19 +7,12 @@ const { wrapComment } = require('./general'); * }} Annotation */ -const UNSUPPORTED_DB_VERSIONS = new Set(['12c', '18c']); - /** * Generates annotations string. * @param {function} prepareName - Function to format/escape identifiers - * @param {string} [dbVersion] - Database version * @returns {(annotations: Annotation[]) => string} - returns Annotations string (e.g: "\nANNOTATIONS (...)") or ''. */ -const getAnnotationsString = (prepareName, dbVersion) => annotations => { - if (!dbVersion || UNSUPPORTED_DB_VERSIONS.has(dbVersion)) { - return ''; - } - +const getAnnotationsString = prepareName => annotations => { if (!Array.isArray(annotations) || annotations.length === 0) { return ''; } diff --git a/properties_pane/model_level/modelLevelConfig.json b/properties_pane/model_level/modelLevelConfig.json index 78884ad..fc0aef3 100644 --- a/properties_pane/model_level/modelLevelConfig.json +++ b/properties_pane/model_level/modelLevelConfig.json @@ -184,7 +184,8 @@ making sure that you maintain a proper JSON format. "value": "18c" } ] - } + }, + "adapter": "adaptOracleAnnotationsForLegacy" } ] },