Commit 5c74d53e by zhaochengxiang

类主键自动生成索引

parent 482d478a
...@@ -338,6 +338,10 @@ const ImportAction = (props) => { ...@@ -338,6 +338,10 @@ const ImportAction = (props) => {
} }
//类主键自动创建索引 //类主键自动创建索引
let autoEasyDataModelerIndexOrders = [];
(newModelerData.easyDataModelerSemiPrimaryKey||[]).forEach(item => {
autoEasyDataModelerIndexOrders.push('ASC');
});
let autoEasyDataModelerIndex = { let autoEasyDataModelerIndex = {
"name": `i_pk_${newModelerData.name}`, "name": `i_pk_${newModelerData.name}`,
"indextype": { "indextype": {
...@@ -349,9 +353,7 @@ const ImportAction = (props) => { ...@@ -349,9 +353,7 @@ const ImportAction = (props) => {
], ],
"default": true "default": true
}, },
"indexedAttributeOrders": [ "indexedAttributeOrders": [...autoEasyDataModelerIndexOrders],
"ASC"
],
"indexedEasyDataModelAttributes": [...newModelerData.easyDataModelerSemiPrimaryKey], "indexedEasyDataModelAttributes": [...newModelerData.easyDataModelerSemiPrimaryKey],
"unique": true "unique": true
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment