Skip to content

Commit

Permalink
HCK-9128: Handle indexes without indxKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightlngale committed Dec 15, 2024
1 parent 67059f1 commit af7b94a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 3 additions & 1 deletion forward_engineering/ddlProvider/ddlProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ module.exports = (baseProvider, options, app) => {
},

createIndex(tableName, index, dbData, isParentActivated = true) {
if (!index.columns.length) {
const isNameEmpty = !index.indxName && index.ifNotExist;

if (!index.columns.length || isNameEmpty) {
return '';
}

Expand Down
19 changes: 18 additions & 1 deletion properties_pane/entity_level/entityLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,24 @@ making sure that you maintain a proper JSON format.
"propertyName": "Name",
"propertyKeyword": "indxName",
"propertyTooltip": "Optional, if not specified an automatic name will be assigned. Index name are needed to drop indexes and appear in error messages when a constraint is violated.",
"propertyType": "text"
"propertyType": "text",
"dependency": {
"key": "ifNotExist",
"value": false
}
},
{
"propertyName": "Name",
"propertyKeyword": "indxName",
"propertyTooltip": "",
"propertyType": "text",
"validation": {
"required": true
},
"dependency": {
"key": "ifNotExist",
"value": true
}
},
{
"propertyName": "Activated",
Expand Down

0 comments on commit af7b94a

Please sign in to comment.