indexes improvements

This commit is contained in:
Taras Machyshyn
2014-12-02 12:25:38 +02:00
parent 63a9f67bd9
commit 91445f2f9c
2 changed files with 9 additions and 2 deletions
@@ -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) {
@@ -164,6 +164,9 @@
"asc": true
},
"indexes": {
"name": ["name"]
"name": {
"type": "index",
"columns": ["name"]
}
}
}