Skip to content

Commit a4a54e7

Browse files
committed
Fix "Syntax error or access violation: Duplicate key name" If we apply fulltext index and unique constraint on same column.
1 parent a051525 commit a4a54e7

File tree

1 file changed

+1
-1
lines changed
  • lib/internal/Magento/Framework/DB/Adapter/Pdo

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3578,7 +3578,7 @@ public function getIndexName($tableName, $fields, $indexType = '')
35783578
default:
35793579
$prefix = 'idx_';
35803580
}
3581-
return strtoupper(ExpressionConverter::shortenEntityName($tableName . '_' . $fields, $prefix));
3581+
return strtoupper(ExpressionConverter::shortenEntityName($tableName . '_' . $fields . substr("_" . $prefix, 0, -1), $prefix));
35823582
}
35833583

35843584
/**

0 commit comments

Comments
 (0)