From 71ff92f2068f0c05f3b09c7a3e9b642b8b14134a Mon Sep 17 00:00:00 2001 From: yevhenii-moroziuk Date: Tue, 22 Oct 2024 17:47:05 +0300 Subject: [PATCH] HCK-8498: Fix DDL when single key in composite key (primary and unique) --- forward_engineering/helpers/constraintsHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 => {