diff --git a/forward_engineering/helpers/constraintsHelper.js b/forward_engineering/helpers/constraintsHelper.js index 302a90a..2d957bd 100644 --- a/forward_engineering/helpers/constraintsHelper.js +++ b/forward_engineering/helpers/constraintsHelper.js @@ -66,7 +66,7 @@ module.exports = app => { const cleaned = clean(_.omit(keyData, 'keyType', 'indexOption', 'columns')); - return !_.isEmpty(cleaned) || keyData.columns?.length > 1; + return !_.isEmpty(cleaned) || keyData.columns?.length > 0; }; const adaptIndexOptions = indexOption => {