Skip to content

Commit 3156c71

Browse files
committed
Change keyword to keep it in sync with keyword in primaryKeyOptions and uniqueKeyOptions on field level
1 parent 6e2d335 commit 3156c71

File tree

4 files changed

+38
-82
lines changed

4 files changed

+38
-82
lines changed

adapter/0.1.36.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@
4141
*/
4242
{
4343
"modify": {
44+
"entity": [
45+
[
46+
"renamePropertiesInArrayElements",
47+
"primaryKey",
48+
{
49+
"include": "indexInclude"
50+
}
51+
],
52+
[
53+
"renamePropertiesInArrayElements",
54+
"uniqueKey",
55+
{
56+
"include": "indexInclude"
57+
}
58+
]
59+
],
4460
"field": [["validateField", "default"]]
4561
}
4662
}

forward_engineering/helpers/keyHelper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = (_, clean) => {
5050
isActivated: isActivated,
5151
},
5252
],
53-
include: getKeys(options['include'] || options['indexInclude'] || [], jsonSchema),
53+
include: getKeys(options['indexInclude'] || [], jsonSchema),
5454
storageParameters: options['indexStorageParameters'],
5555
comment: options['indexComment'],
5656
tablespace: options['indexTablespace'],
@@ -67,7 +67,7 @@ module.exports = (_, clean) => {
6767
isActivated: isActivated,
6868
},
6969
],
70-
include: getKeys(options['include'] || options['indexInclude'] || [], jsonSchema),
70+
include: getKeys(options['indexInclude'] || [], jsonSchema),
7171
storageParameters: options['indexStorageParameters'],
7272
comment: options['indexComment'],
7373
tablespace: options['indexTablespace'],

properties_pane/entity_level/entityLevelConfig.json

Lines changed: 19 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -188,23 +188,15 @@ making sure that you maintain a proper JSON format.
188188
"propertyTooltip": "Choose the desired partition method",
189189
"propertyType": "select",
190190
"defaultValue": "",
191-
"options": [
192-
"",
193-
"RANGE",
194-
"LIST",
195-
"HASH"
196-
]
191+
"options": ["", "RANGE", "LIST", "HASH"]
197192
},
198193
{
199194
"propertyName": "Partition by",
200195
"propertyKeyword": "partitionBy",
201196
"propertyTooltip": "",
202197
"propertyType": "select",
203198
"defaultValue": "keys",
204-
"options": [
205-
"keys",
206-
"expression"
207-
]
199+
"options": ["keys", "expression"]
208200
},
209201
{
210202
"propertyName": "Partition key",
@@ -599,11 +591,7 @@ making sure that you maintain a proper JSON format.
599591
"propertyTooltip": "Controls the behavior of temporary tables at the end of a transaction block can be controlled.",
600592
"propertyType": "select",
601593
"defaultValue": "PRESERVE ROWS",
602-
"options": [
603-
"PRESERVE ROWS",
604-
"DELETE ROWS",
605-
"DROP"
606-
],
594+
"options": ["PRESERVE ROWS", "DELETE ROWS", "DROP"],
607595
"dependency": {
608596
"key": "temporary",
609597
"value": true
@@ -633,10 +621,7 @@ making sure that you maintain a proper JSON format.
633621
"valueType": "string"
634622
}
635623
],
636-
"columnsRatio": [
637-
3.7,
638-
5
639-
]
624+
"columnsRatio": [3.7, 5]
640625
},
641626
{
642627
"lowerTab": "Composite keys",
@@ -668,7 +653,7 @@ making sure that you maintain a proper JSON format.
668653
}
669654
]
670655
}
671-
},
656+
},
672657
{
673658
"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",
674659
"dependency": {
@@ -698,7 +683,7 @@ making sure that you maintain a proper JSON format.
698683
},
699684
{
700685
"propertyName": "Include non-key columns",
701-
"propertyKeyword": "include",
686+
"propertyKeyword": "indexInclude",
702687
"propertyType": "fieldList",
703688
"template": "orderedList",
704689
"propertyTooltip": "The optional INCLUDE clause specifies a list of columns which will be included in the constraint as non-key columns."
@@ -792,7 +777,7 @@ making sure that you maintain a proper JSON format.
792777
},
793778
{
794779
"propertyName": "Include non-key columns",
795-
"propertyKeyword": "include",
780+
"propertyKeyword": "indexInclude",
796781
"propertyType": "fieldList",
797782
"template": "orderedList",
798783
"propertyTooltip": "The optional INCLUDE clause specifies a list of columns which will be included in the constraint as non-key columns."
@@ -824,11 +809,7 @@ making sure that you maintain a proper JSON format.
824809
"propertyKeyword": "nullsDistinct",
825810
"propertyType": "select",
826811
"defaultValue": "",
827-
"options": [
828-
"",
829-
"NULLS DISTINCT",
830-
"NULLS NOT DISTINCT"
831-
]
812+
"options": ["", "NULLS DISTINCT", "NULLS NOT DISTINCT"]
832813
}
833814
]
834815
}
@@ -862,14 +843,7 @@ making sure that you maintain a proper JSON format.
862843
"propertyTooltip": "",
863844
"propertyType": "select",
864845
"defaultValue": "btree",
865-
"options": [
866-
"btree",
867-
"hash",
868-
"gist",
869-
"spgist",
870-
"gin",
871-
"brin"
872-
]
846+
"options": ["btree", "hash", "gist", "spgist", "gin", "brin"]
873847
},
874848
{
875849
"propertyName": "Unique",
@@ -892,11 +866,7 @@ making sure that you maintain a proper JSON format.
892866
"propertyKeyword": "nullsDistinct",
893867
"propertyType": "select",
894868
"defaultValue": "",
895-
"options": [
896-
"",
897-
"NULLS DISTINCT",
898-
"NULLS NOT DISTINCT"
899-
],
869+
"options": ["", "NULLS DISTINCT", "NULLS NOT DISTINCT"],
900870
"dependency": {
901871
"type": "and",
902872
"values": [
@@ -967,19 +937,12 @@ making sure that you maintain a proper JSON format.
967937
"attributeList": {
968938
"sortOrder": {
969939
"propertyType": "select",
970-
"options": [
971-
"ASC",
972-
"DESC"
973-
],
940+
"options": ["ASC", "DESC"],
974941
"propertyTooltip": "Specifies sort order"
975942
},
976943
"nullsOrder": {
977944
"propertyType": "select",
978-
"options": [
979-
"",
980-
"NULLS FIRST",
981-
"NULLS LAST"
982-
],
945+
"options": ["", "NULLS FIRST", "NULLS LAST"],
983946
"propertyTooltip": "Specifies that nulls sort order"
984947
},
985948
"collation": {
@@ -1068,10 +1031,7 @@ making sure that you maintain a proper JSON format.
10681031
],
10691032
"dependency": {
10701033
"key": "index_method",
1071-
"value": [
1072-
"hash",
1073-
"spgist"
1074-
]
1034+
"value": ["hash", "spgist"]
10751035
}
10761036
},
10771037
{
@@ -1096,11 +1056,7 @@ making sure that you maintain a proper JSON format.
10961056
"propertyKeyword": "index_buffering",
10971057
"propertyType": "select",
10981058
"propertyTooltip": "Determines whether the buffering build technique is used to build the index.",
1099-
"options": [
1100-
"AUTO",
1101-
"OFF",
1102-
"ON"
1103-
],
1059+
"options": ["AUTO", "OFF", "ON"],
11041060
"defaultValue": "AUTO"
11051061
}
11061062
],
@@ -1294,11 +1250,7 @@ making sure that you maintain a proper JSON format.
12941250
"propertyKeyword": "triggerType",
12951251
"propertyTooltip": "Determines whether the function is called before, after, or instead of the event.",
12961252
"propertyType": "select",
1297-
"options": [
1298-
"BEFORE",
1299-
"AFTER",
1300-
"INSTEAD OF"
1301-
],
1253+
"options": ["BEFORE", "AFTER", "INSTEAD OF"],
13021254
"defaultValue": "AFTER"
13031255
},
13041256
{
@@ -1311,12 +1263,7 @@ making sure that you maintain a proper JSON format.
13111263
"propertyKeyword": "triggerEvent",
13121264
"propertyTooltip": "This specifies the event that will fire the trigger",
13131265
"propertyType": "select",
1314-
"options": [
1315-
"INSERT",
1316-
"UPDATE",
1317-
"DELETE",
1318-
"TRUNCATE"
1319-
]
1266+
"options": ["INSERT", "UPDATE", "DELETE", "TRUNCATE"]
13201267
}
13211268
]
13221269
},
@@ -1347,11 +1294,7 @@ making sure that you maintain a proper JSON format.
13471294
"propertyName": "Deferrable",
13481295
"propertyKeyword": "triggerTimeConstraintCheck",
13491296
"propertyType": "select",
1350-
"options": [
1351-
"",
1352-
"INITIALLY IMMEDIATE",
1353-
"INITIALLY DEFERRED"
1354-
],
1297+
"options": ["", "INITIALLY IMMEDIATE", "INITIALLY DEFERRED"],
13551298
"propertyTooltip": "If a constraint is deferrable, this clause specifies the default time to check the constraint. If the constraint is INITIALLY IMMEDIATE, it is checked after each statement. This is the default. If the constraint is INITIALLY DEFERRED, it is checked only at the end of the transaction.",
13561299
"dependency": {
13571300
"type": "and",
@@ -1398,10 +1341,7 @@ making sure that you maintain a proper JSON format.
13981341
"propertyKeyword": "triggerEachRowStatement",
13991342
"propertyType": "select",
14001343
"propertyTooltip": "This specifies whether the trigger function should be fired once for every row affected by the trigger event, or just once per SQL statement.",
1401-
"options": [
1402-
"FOR EACH STATEMENT",
1403-
"FOR EACH ROW"
1404-
],
1344+
"options": ["FOR EACH STATEMENT", "FOR EACH ROW"],
14051345
"dependency": {
14061346
"type": "not",
14071347
"values": {
@@ -1446,4 +1386,4 @@ making sure that you maintain a proper JSON format.
14461386
}
14471387
]
14481388
}
1449-
]
1389+
]

reverse_engineering/helpers/postgresHelpers/reorganizePrimaryKeys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const setPrimaryKeyData = (attribute, primaryKey) => {
2525
primaryKeyOptions: [
2626
{
2727
constraintName: primaryKey.constraintName,
28-
indexInclude: primaryKey.include,
28+
indexInclude: primaryKey.indexInclude,
2929
indexStorageParameters: primaryKey.indexStorageParameters,
3030
indexTablespace: primaryKey.indexTablespace,
3131
indexComment: primaryKey.indexComment,

0 commit comments

Comments
 (0)