diff --git a/application/Espo/Core/Utils/Database/Schema/Converter.php b/application/Espo/Core/Utils/Database/Schema/Converter.php index a9192d98eb..617a11a4be 100644 --- a/application/Espo/Core/Utils/Database/Schema/Converter.php +++ b/application/Espo/Core/Utils/Database/Schema/Converter.php @@ -165,7 +165,11 @@ class Converter //add indexes if (isset($entityParams['indexes']) && is_array($entityParams['indexes'])) { - $indexList = array_merge($indexList, $entityParams['indexes']); + foreach ($entityParams['indexes'] as $indexName => $indexParams) { + if (is_array($indexParams['columns'])) { + $indexList[$indexName] = $indexParams['columns']; + } + } } if (!empty($indexList)) { foreach($indexList as $indexName => $indexItem) { diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json index e88a556ab6..0ccefd4c0c 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json @@ -164,6 +164,9 @@ "asc": true }, "indexes": { - "name": ["name"] + "name": { + "type": "index", + "columns": ["name"] + } } }