diff --git a/forward_engineering/ddlProvider/ddlProvider.js b/forward_engineering/ddlProvider/ddlProvider.js index 49ae382..57fb45a 100644 --- a/forward_engineering/ddlProvider/ddlProvider.js +++ b/forward_engineering/ddlProvider/ddlProvider.js @@ -118,7 +118,7 @@ module.exports = (baseProvider, options, app) => { }); }, - createSchema({ schemaName, ifNotExist, comments, udfs, procedures }) { + createSchema({ schemaName, ifNotExist, comments, udfs, procedures, isActivated = true }) { const comment = assignTemplates(templates.comment, { object: 'SCHEMA', objectName: wrapInQuotes(schemaName), @@ -134,12 +134,13 @@ module.exports = (baseProvider, options, app) => { const createFunctionStatement = getFunctionsScript(schemaName, udfs); const createProceduresStatement = getProceduresScript(schemaName, procedures); - return _.chain([schemaStatement, createFunctionStatement, createProceduresStatement]) + const statement = _.chain([schemaStatement, createFunctionStatement, createProceduresStatement]) .compact() .map(_.trim) .join('\n\n') .trim() .value(); + return commentIfDeactivated(statement, { isActivated }); }, createTable( @@ -704,6 +705,7 @@ module.exports = (baseProvider, options, app) => { udfs: data?.udfs || [], procedures: data?.procedures || [], dbVersion, + isActivated: containerData.isActivated, }; },