Skip to content

Commit 22e23ea

Browse files
authored
HCK-9185: [MySQL] Invalid 'KEY' index type is available for select in PP (#39)
1 parent ebd4b79 commit 22e23ea

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

forward_engineering/ddlProvider.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,7 @@ module.exports = (baseProvider, options, app) => {
432432

433433
const allDeactivated = checkAllKeysDeactivated(index.indxKey || []);
434434
const wholeStatementCommented = index.isActivated === false || !isParentActivated || allDeactivated;
435-
const indexType =
436-
index.indexType && _.toUpper(index.indexType) !== 'KEY' ? `${_.toUpper(index.indexType)} ` : '';
435+
const indexType = index.indexType ? `${_.toUpper(index.indexType)} ` : '';
437436
const name = wrap(index.indxName || '', '`', '`');
438437
const table = getTableName(tableName, dbData.databaseName);
439438
const indexCategory = index.indexCategory ? ` USING ${index.indexCategory}` : '';

properties_pane/entity_level/entityLevelConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ making sure that you maintain a proper JSON format.
17271727
"propertyTooltip": "",
17281728
"propertyType": "select",
17291729
"defaultValue": "",
1730-
"options": ["", "KEY", "UNIQUE", "FULLTEXT", "SPATIAL"]
1730+
"options": ["", "UNIQUE", "FULLTEXT", "SPATIAL"]
17311731
},
17321732
{
17331733
"propertyName": "Category",

reverse_engineering/helpers/mysqlHelper.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,9 @@ const getIndexType = index => {
303303
return 'SPATIAL';
304304
} else if (Number(index['Non_unique']) === 0) {
305305
return 'UNIQUE';
306-
} else if (index['Index_type'] === 'KEY') {
307-
return 'KEY';
308-
} else {
309-
return '';
310306
}
307+
308+
return '';
311309
};
312310

313311
const getIndexCategory = index => {

0 commit comments

Comments
 (0)