diff --git a/forward_engineering/ddlProvider/ddlTemplates.js b/forward_engineering/ddlProvider/ddlTemplates.js index 5dbaeda..726fc83 100644 --- a/forward_engineering/ddlProvider/ddlTemplates.js +++ b/forward_engineering/ddlProvider/ddlTemplates.js @@ -1,6 +1,6 @@ module.exports = { createView: - 'CREATE${orReplace}${global}${temporary} VIEW${ifNotExists} ${name}${columnList}${schemaBinding}${comment}${tablePropertyStatements}${query};${viewUnityTagsStatements}', + 'CREATE${orReplace}${global}${temporary} VIEW${ifNotExists} ${name} ${columnList}${schemaBinding}${comment}${tablePropertyStatements}${query};${viewUnityTagsStatements}', dropView: 'DROP VIEW IF EXISTS ${name};', diff --git a/forward_engineering/utils/general.js b/forward_engineering/utils/general.js index 0695438..15640df 100644 --- a/forward_engineering/utils/general.js +++ b/forward_engineering/utils/general.js @@ -180,7 +180,7 @@ const wrapInTicks = (str = '') => { }; const wrapInBrackets = (str = '') => { - return /^\(\S+\)$/.test(str) ? str : `(${str})`; + return /^\(.*\)$/.test(str) ? str : `(${str})`; }; /**