diff --git a/forward_engineering/ddlProvider/ddlHelpers/keyHelper.js b/forward_engineering/ddlProvider/ddlHelpers/keyHelper.js index 8876036..e17c99c 100644 --- a/forward_engineering/ddlProvider/ddlHelpers/keyHelper.js +++ b/forward_engineering/ddlProvider/ddlHelpers/keyHelper.js @@ -37,12 +37,16 @@ module.exports = (_, clean) => { return 'ASC'; } else if (_.toLower(order) === 'desc') { return 'DESC'; - } else { - return ''; } + + return ''; }; - const mapKeyOrder = key => `\`${key.name}\`${key.type === 'DESC' ? ' DESC' : ''}`; + const mapKeyOrder = key => { + const order = getOrder(key.type); + + return `\`${key.name}\`${order ? ` ${order}` : ''}`; + }; const hydrateUniqueOptions = (options, columnName, isActivated) => clean({ diff --git a/properties_pane/entity_level/entityLevelConfig.json b/properties_pane/entity_level/entityLevelConfig.json index 5a08936..352b679 100644 --- a/properties_pane/entity_level/entityLevelConfig.json +++ b/properties_pane/entity_level/entityLevelConfig.json @@ -1950,7 +1950,7 @@ making sure that you maintain a proper JSON format. "propertyTooltip": "", "propertyType": "select", "defaultValue": "", - "options": ["", "KEY", "UNIQUE", "FULLTEXT", "SPATIAL"] + "options": ["", "UNIQUE", "FULLTEXT", "SPATIAL"] }, { "propertyName": "Category", diff --git a/reverse_engineering/helpers/mariadbHelper.js b/reverse_engineering/helpers/mariadbHelper.js index 394a221..83a1c87 100644 --- a/reverse_engineering/helpers/mariadbHelper.js +++ b/reverse_engineering/helpers/mariadbHelper.js @@ -253,11 +253,9 @@ const getIndexType = index => { return 'SPATIAL'; } else if (Number(index['Non_unique']) === 0) { return 'UNIQUE'; - } else if (index['Index_type'] === 'KEY') { - return 'KEY'; - } else { - return ''; } + + return ''; }; const getIndexCategory = index => {