From ed4451dea8abb791515fc3364872a0ad4d6bb272 Mon Sep 17 00:00:00 2001 From: Taras Dubyk Date: Wed, 4 Feb 2026 13:38:39 +0200 Subject: [PATCH 1/2] preserve constraints for streaming tables --- forward_engineering/config.json | 197 +++++++++++++++++++++++++++++++- 1 file changed, 191 insertions(+), 6 deletions(-) diff --git a/forward_engineering/config.json b/forward_engineering/config.json index 431964a..3214add 100644 --- a/forward_engineering/config.json +++ b/forward_engineering/config.json @@ -68,7 +68,32 @@ }, "defaultValue": { "primaryKey": [] - } + }, + "applyToValue": "ignore" + }, + { + "dependency": { + "type": "and", + "values": [ + { + "key": "primaryKey", + "valueType": "array" + }, + { + "type": "not", + "values": [ + { + "key": "streamingTable", + "value": true + } + ] + } + ] + }, + "defaultValue": { + "primaryKey": [] + }, + "applyToValue": "separate" }, { "dependency": { @@ -87,7 +112,43 @@ "defaultValue": { "primaryKey": false, "compositePrimaryKey": false - } + }, + "applyToValue": "ignore" + }, + { + "dependency": { + "type": "and", + "values": [ + { + "type": "or", + "values": [ + { + "key": "primaryKey", + "value": true + }, + { + "key": "compositePrimaryKey", + "value": true + } + ] + }, + { + "type": "not", + "values": [ + { + "level": "root", + "key": "streamingTable", + "value": true + } + ] + } + ] + }, + "defaultValue": { + "primaryKey": false, + "compositePrimaryKey": false + }, + "applyToValue": "separate" } ] }, @@ -164,7 +225,33 @@ }, "defaultValue": { "required": false - } + }, + "applyToValue": "ignore" + }, + { + "dependency": { + "type": "and", + "values": [ + { + "key": "required", + "value": true + }, + { + "type": "not", + "values": [ + { + "level": "root", + "key": "streamingTable", + "value": true + } + ] + } + ] + }, + "defaultValue": { + "required": false + }, + "applyToValue": "separate" } ] }, @@ -251,7 +338,33 @@ }, "defaultValue": { "default": "" - } + }, + "applyToValue": "ignore" + }, + { + "dependency": { + "type": "and", + "values": [ + { + "key": "default", + "exist": true + }, + { + "type": "not", + "values": [ + { + "level": "root", + "key": "streamingTable", + "value": true + } + ] + } + ] + }, + "defaultValue": { + "default": "" + }, + "applyToValue": "separate" } ] }, @@ -326,7 +439,36 @@ }, "defaultValue": { "description": "" - } + }, + "applyToValue": "ignore" + }, + { + "dependency": { + "type": "and", + "values": [ + { + "key": "collectionName", + "exist": true + }, + { + "key": "description", + "exist": true + }, + { + "type": "not", + "values": [ + { + "key": "streamingTable", + "value": true + } + ] + } + ] + }, + "defaultValue": { + "description": "" + }, + "applyToValue": "separate" } ] }, @@ -414,7 +556,50 @@ }, "defaultValue": { "description": "" - } + }, + "applyToValue": "ignore" + }, + { + "dependency": { + "type": "and", + "values": [ + { + "type": "not", + "values": [ + { + "key": "type", + "value": "bucket" + } + ] + }, + { + "key": "collectionName", + "exist": false + }, + { + "key": "viewOn", + "exist": false + }, + { + "key": "description", + "exist": true + }, + { + "type": "not", + "values": [ + { + "level": "root", + "key": "streamingTable", + "value": true + } + ] + } + ] + }, + "defaultValue": { + "description": "" + }, + "applyToValue": "separate" } ] } From d1629094cb26549a8beba5445fed26c2cf2d5060 Mon Sep 17 00:00:00 2001 From: Taras Dubyk Date: Wed, 4 Feb 2026 15:28:49 +0200 Subject: [PATCH 2/2] add preserving of streaming table FKs --- forward_engineering/config.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/forward_engineering/config.json b/forward_engineering/config.json index 3214add..7e8f5e2 100644 --- a/forward_engineering/config.json +++ b/forward_engineering/config.json @@ -172,7 +172,19 @@ "disabled": false, "disabledLabel": "" } - } + }, + "filterAdapters": [ + { + "applyToValue": "separate", + "adapter": "preserveRelationshipsForTablesMatchingDependency", + "adapterProps": { + "dependency": { + "key": "streamingTable", + "value": true + } + } + } + ] }, { "keyword": "uniqueConstraints",