diff --git a/forward_engineering/helpers/commentIfDeactivated.js b/forward_engineering/helpers/commentIfDeactivated.js index 4ef1e93..67bac10 100644 --- a/forward_engineering/helpers/commentIfDeactivated.js +++ b/forward_engineering/helpers/commentIfDeactivated.js @@ -1,5 +1,5 @@ const BEFORE_DEACTIVATED_STATEMENT = '-- '; -const REG_FOR_MULTYLINE_COMMENT = /(\n\/\*\n[\s\S]*?\n\s\*\/\n)$|(\n\/\*\n[\s\S]*?\n\s\*\/)$/gi; +const REG_FOR_MULTYLINE_COMMENT = /(\n\/\*\n[\s\S]*?\n\s\*\/\n)|((\n\/\*\n[\s\S]*?\n\s\*\/)$)/gi; const commentIfDeactivated = (statement, data, isPartOfLine) => { if (data?.hasOwnProperty('isActivated') && !data.isActivated) { diff --git a/reverse_engineering/reverseEngineeringService/helpers/reverseTableColumn.js b/reverse_engineering/reverseEngineeringService/helpers/reverseTableColumn.js index 89933c1..153e5e7 100644 --- a/reverse_engineering/reverseEngineeringService/helpers/reverseTableColumn.js +++ b/reverse_engineering/reverseEngineeringService/helpers/reverseTableColumn.js @@ -52,8 +52,8 @@ const handleDefault = (typeObject, value) => { const validValue = { numeric: Number(value.replace(/(^\(\()|(\)\)$)/g, '')), - char: value.replace(/(^\(')$|('\))$/g, ''), - xml: value.replace(/(^\(N')$|('\))$/g, ''), + char: value.replace(/(^\(')|(('\))$)/g, ''), + xml: value.replace(/(^\(N')|(('\))$)/g, ''), }[typeObject.type]; return { default: validValue !== undefined ? validValue : value }; @@ -102,7 +102,7 @@ const handleColumnProperty = (column, propertyName, value) => { case 'COLUMN_DEFAULT': return handleDefault(handleType(column['DATA_TYPE']), value); case 'IS_NULLABLE': - return { required: value === 'NO' ? true : false }; + return { required: value === 'NO' }; case 'DATETIME_PRECISION': return { fractSecPrecision: !isNaN(value) ? value : '' }; case 'NUMERIC_SCALE':