From 9c2eea7519c9bd484964ec23bc918e602f6f399d Mon Sep 17 00:00:00 2001 From: Sylvie Paindeville Date: Wed, 4 Nov 2026 09:38:14 +0100 Subject: [PATCH] HCK-18434: comment out separate comment statements of deactivated columns and tables Co-authored-by: Cursor --- forward_engineering/ddlProvider.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/forward_engineering/ddlProvider.js b/forward_engineering/ddlProvider.js index 3448e01..cef0de5 100644 --- a/forward_engineering/ddlProvider.js +++ b/forward_engineering/ddlProvider.js @@ -841,6 +841,7 @@ module.exports = (baseProvider, options, app) => { return { name, compMod: jsonSchema?.role?.compMod, + isActivated: jsonSchema?.role?.isActivated !== false, tableOptions: { ...(isErrorTableModified && { ERROR_TABLE: newTableOptions.ERROR_TABLE }), ...(isForTableModified && { FOR_TABLE: newTableOptions.FOR_TABLE }), @@ -887,11 +888,13 @@ module.exports = (baseProvider, options, app) => { * @param {ColumnDefinition} oldColumn * @param oldCompData * @param newCompData + * @param {boolean} isParentActivated * @return {ModifyColumnData} */ - hydrateAlterColumn({ newColumn, oldColumn, oldCompData, newCompData }) { + hydrateAlterColumn({ newColumn, oldColumn, oldCompData, newCompData, isParentActivated }) { const result = { ...newColumn, + isActivated: newColumn.isActivated !== false && isParentActivated !== false, newProperties: newColumn, oldProperties: oldColumn, }; @@ -1047,7 +1050,12 @@ module.exports = (baseProvider, options, app) => { }) : ''; - return [renameStatement, optionsStatement, commentScript].filter(Boolean).join('\n\n'); + return commentIfDeactivated( + [renameStatement, optionsStatement, commentScript].filter(Boolean).join('\n\n'), + { + isActivated: alterTableData.isActivated, + }, + ); }, /**