Skip to content

Commit

Permalink
Merge pull request #2 from DrMyroslav/HCK-1255-enforce-unique-primary…
Browse files Browse the repository at this point in the history
…-key

enforce PK
  • Loading branch information
DrMyroslav authored Jun 1, 2022
2 parents 4bf3553 + b628565 commit 728881b
Show file tree
Hide file tree
Showing 4 changed files with 741 additions and 77 deletions.
58 changes: 58 additions & 0 deletions adapter/0.1.9.json
Original file line number Diff line number Diff line change
@@ -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": [<names of new property>],
* "container": [<names of new property>],
* "model": [<names of new property>],
* "view": [<names of new property>],
* "field": {
* "<type>": [<names of new property>]
* }
* },
* "delete": {
* "entity": [<names of new property>],
* "container": [<names of new property>],
* "model": [<names of new property>],
* "view": [<names of new property>],
* "field": {
* "<type>": [<names of new property>]
* }
* },
* "modify": {
* "entity": [
* {
* "from": { <properties that identify record> },
* "to": { <properties that need to be changed> }
* }
* ],
* "container": [],
* "model": [],
* "view": [],
* "field": []
* },
* }
*/
{
"modify": {
"entity": [
[
"setRdbmEntityCompositeKeys",
"primaryKey",
"compositePrimaryKey",
"primaryKey",
[
"unique",
"compositePrimaryKey",
"compositeUniqueKey"
]
]
]
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"versionDate": "2022-05-13",
"author": "hackolade",
"engines": {
"hackolade": "6.0.8",
"hackolade": "6.1.2",
"hackoladePlugin": "1.2.0"
},
"contributes": {
Expand Down
73 changes: 72 additions & 1 deletion properties_pane/entity_level/entityLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,78 @@ making sure that you maintain a proper JSON format.
"propertyType": "group",
"groupItemLimit": 1,
"propertyKeyword": "primaryKey",
"propertyTooltip": "",
"propertyTooltip": {
"disabled": [
{
"tooltip": "Remove the existing single column primary key definition prior to unlock the possibility to create a composite primary key definition for this table",
"dependency": {
"type": "and",
"values": [
{
"level": "children",
"key": "primaryKey",
"value": true
},
{
"type": "not",
"values": {
"level": "children",
"key": "compositePrimaryKey",
"value": true
}
}
]
}
},
{
"tooltip": "Remove or update the existing composite primary key definition prior to unlock the possibility to create a new composite primary key definition for this table",
"dependency": {
"key": "primaryKey",
"minLength": 1
}
}
]
},
"disabledOnCondition": [
{
"level": "children",
"value": {
"type": "and",
"values": [
{
"key": "primaryKey",
"value": true
},
{
"type": "or",
"values": [
{
"key": "compositePrimaryKey",
"value": false
},
{
"key": "compositePrimaryKey",
"exist": false
}
]
},
{
"type": "or",
"values": [
{
"key": "compositeUniqueKey",
"value": false
},
{
"key": "compositeUniqueKey",
"exist": false
}
]
}
]
}
}
],
"structure": [{
"propertyName": "Constraint name",
"propertyKeyword": "constraintName",
Expand Down
Loading

0 comments on commit 728881b

Please sign in to comment.