From a0f8d827706f00ca54ce8e1fc6adc60d6fad051e Mon Sep 17 00:00:00 2001 From: Taras Dubyk Date: Fri, 4 Oct 2024 14:21:32 +0300 Subject: [PATCH] HCK-8237: field single PK and UK should be mutually exclusive (#110) * enable showing all field abbreviations * field single PK and UK should be mutually exclusive --- adapter/0.2.8.json | 58 +++++++ package.json | 3 +- .../field_level/fieldLevelConfig.json | 154 +++++++++++++++--- 3 files changed, 193 insertions(+), 22 deletions(-) create mode 100644 adapter/0.2.8.json diff --git a/adapter/0.2.8.json b/adapter/0.2.8.json new file mode 100644 index 0000000..000a685 --- /dev/null +++ b/adapter/0.2.8.json @@ -0,0 +1,58 @@ +/** + * Copyright © 2016-2018 by IntegrIT S.A. dba Hackolade. All rights reserved. + * + * The copyright to the computer software herein is the property of IntegrIT S.A. + * The software may be used and/or copied only with the written permission of + * IntegrIT S.A. or in accordance with the terms and conditions stipulated in + * the agreement/contract under which the software has been supplied. + * + * { + * "add": { + * "entity": [], + * "container": [], + * "model": [], + * "view": [], + * "field": { + * "": [] + * } + * }, + * "delete": { + * "entity": [], + * "container": [], + * "model": [], + * "view": [], + * "field": { + * "": [] + * } + * }, + * "modify": { + * "entity": [ + * { + * "from": { }, + * "to": { } + * } + * ], + * "container": [], + * "model": [], + * "view": [], + * "field": [] + * }, + * } + */ +{ + "add": {}, + "modify": { + "field": [ + { + "from": { + "primaryKey": true, + "unique": true + }, + "to": { + "unique": false + } + } + ] + }, + "delete": {} +} diff --git a/package.json b/package.json index b11494a..d57dee6 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,8 @@ }, "FEScriptCommentsSupported": true, "enableFetchSystemEntitiesCheckbox": true, - "discoverRelationships": true + "discoverRelationships": true, + "enableKeysMultipleAbrr": true } }, "description": "Hackolade plugin for Microsoft SQL Server and Azure SQL Database", diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 4fa5c5d..e01081f 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -553,6 +553,13 @@ making sure that you maintain a proper JSON format. ] } ] + }, + { + "type": "not", + "values": { + "key": "unique", + "value": true + } } ] } @@ -696,12 +703,21 @@ making sure that you maintain a proper JSON format. "type": "or", "values": [ { - "key": "compositePrimaryKey", - "value": false + "type": "or", + "values": [ + { + "key": "primaryKey", + "value": false + }, + { + "key": "primaryKey", + "exist": false + } + ] }, { "key": "compositePrimaryKey", - "exist": false + "value": true } ] }, @@ -1202,6 +1218,13 @@ making sure that you maintain a proper JSON format. ] } ] + }, + { + "type": "not", + "values": { + "key": "unique", + "value": true + } } ] } @@ -1345,12 +1368,21 @@ making sure that you maintain a proper JSON format. "type": "or", "values": [ { - "key": "compositePrimaryKey", - "value": false + "type": "or", + "values": [ + { + "key": "primaryKey", + "value": false + }, + { + "key": "primaryKey", + "exist": false + } + ] }, { "key": "compositePrimaryKey", - "exist": false + "value": true } ] }, @@ -1815,6 +1847,13 @@ making sure that you maintain a proper JSON format. ] } ] + }, + { + "type": "not", + "values": { + "key": "unique", + "value": true + } } ] } @@ -1958,12 +1997,21 @@ making sure that you maintain a proper JSON format. "type": "or", "values": [ { - "key": "compositePrimaryKey", - "value": false + "type": "or", + "values": [ + { + "key": "primaryKey", + "value": false + }, + { + "key": "primaryKey", + "exist": false + } + ] }, { "key": "compositePrimaryKey", - "exist": false + "value": true } ] }, @@ -2418,6 +2466,13 @@ making sure that you maintain a proper JSON format. ] } ] + }, + { + "type": "not", + "values": { + "key": "unique", + "value": true + } } ] } @@ -2561,12 +2616,21 @@ making sure that you maintain a proper JSON format. "type": "or", "values": [ { - "key": "compositePrimaryKey", - "value": false + "type": "or", + "values": [ + { + "key": "primaryKey", + "value": false + }, + { + "key": "primaryKey", + "exist": false + } + ] }, { "key": "compositePrimaryKey", - "exist": false + "value": true } ] }, @@ -3010,6 +3074,13 @@ making sure that you maintain a proper JSON format. ] } ] + }, + { + "type": "not", + "values": { + "key": "unique", + "value": true + } } ] } @@ -3153,12 +3224,21 @@ making sure that you maintain a proper JSON format. "type": "or", "values": [ { - "key": "compositePrimaryKey", - "value": false + "type": "or", + "values": [ + { + "key": "primaryKey", + "value": false + }, + { + "key": "primaryKey", + "exist": false + } + ] }, { "key": "compositePrimaryKey", - "exist": false + "value": true } ] }, @@ -3585,6 +3665,13 @@ making sure that you maintain a proper JSON format. ] } ] + }, + { + "type": "not", + "values": { + "key": "unique", + "value": true + } } ] } @@ -3728,12 +3815,21 @@ making sure that you maintain a proper JSON format. "type": "or", "values": [ { - "key": "compositePrimaryKey", - "value": false + "type": "or", + "values": [ + { + "key": "primaryKey", + "value": false + }, + { + "key": "primaryKey", + "exist": false + } + ] }, { "key": "compositePrimaryKey", - "exist": false + "value": true } ] }, @@ -4145,6 +4241,13 @@ making sure that you maintain a proper JSON format. ] } ] + }, + { + "type": "not", + "values": { + "key": "unique", + "value": true + } } ] } @@ -4288,12 +4391,21 @@ making sure that you maintain a proper JSON format. "type": "or", "values": [ { - "key": "compositePrimaryKey", - "value": false + "type": "or", + "values": [ + { + "key": "primaryKey", + "value": false + }, + { + "key": "primaryKey", + "exist": false + } + ] }, { "key": "compositePrimaryKey", - "exist": false + "value": true } ] },