@steedos/service-fields-indexs 3.0.0-beta.98 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/collection-indexes/cfs.instances.files.index.js +40 -0
- package/collection-indexes/cms_categories.index.js +26 -0
- package/collection-indexes/cms_posts.index.js +34 -0
- package/collection-indexes/default_db.js +27 -8
- package/collection-indexes/flow_positions.index.js +60 -0
- package/collection-indexes/flow_roles.index.js +35 -0
- package/collection-indexes/flows.index.js +116 -0
- package/collection-indexes/forms.index.js +69 -0
- package/collection-indexes/instance_number_rules.index.js +26 -0
- package/collection-indexes/instance_record_queue.index.js +33 -0
- package/collection-indexes/instance_tasks.index.js +35 -51
- package/collection-indexes/instances.index.js +242 -0
- package/collection-indexes/organizations.index.js +88 -0
- package/collection-indexes/process_delegation_rules.index.js +26 -0
- package/collection-indexes/space_user_signs.index.js +26 -0
- package/collection-indexes/space_users.index.js +94 -0
- package/collection-indexes/spaces.index.js +50 -0
- package/collection-indexes/steedos_keyvalue.index.js +60 -0
- package/collection-indexes/users.index.js +145 -0
- package/collection-indexes/webhooks.index.js +29 -0
- package/collection-indexes/workflow_nav.index.js +37 -0
- package/package.json +2 -3
- package/package.service.js +4 -22
- package/meteor-collection-indexs/cfs.instances.files.object.js +0 -6
- package/meteor-collection-indexs/cms_categories.object.js +0 -15
- package/meteor-collection-indexs/cms_posts.object.js +0 -22
- package/meteor-collection-indexs/flow_positions.object.js +0 -34
- package/meteor-collection-indexs/flow_roles.object.js +0 -15
- package/meteor-collection-indexs/flows.object.js +0 -85
- package/meteor-collection-indexs/forms.object.js +0 -48
- package/meteor-collection-indexs/instance_number_rules.object.js +0 -8
- package/meteor-collection-indexs/instance_record_queue.object.js +0 -11
- package/meteor-collection-indexs/instances.object.js +0 -221
- package/meteor-collection-indexs/organizations.object.js +0 -65
- package/meteor-collection-indexs/process_delegation_rules.object.js +0 -10
- package/meteor-collection-indexs/space_user_signs.object.js +0 -9
- package/meteor-collection-indexs/space_users.object.js +0 -74
- package/meteor-collection-indexs/spaces.object.js +0 -27
- package/meteor-collection-indexs/steedos_keyvalue.object.js +0 -45
- package/meteor-collection-indexs/users.object.js +0 -109
- package/meteor-collection-indexs/webhooks.object.js +0 -18
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
// users_indexes.js
|
|
2
|
+
const {
|
|
3
|
+
createIndexIfNotExists,
|
|
4
|
+
getCollection
|
|
5
|
+
} = require('./default_db');
|
|
6
|
+
|
|
7
|
+
async function run() {
|
|
8
|
+
const collection = await getCollection('users');
|
|
9
|
+
|
|
10
|
+
if (!collection) {
|
|
11
|
+
console.error('无法获取集合 users');
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 创建 email 单字段索引
|
|
16
|
+
await createIndexIfNotExists(collection, 'email', {
|
|
17
|
+
"email": 1
|
|
18
|
+
}, {
|
|
19
|
+
background: true
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// 创建 is_deleted 和 email 复合索引
|
|
23
|
+
await createIndexIfNotExists(collection, 'is_deleted_email', {
|
|
24
|
+
"is_deleted": 1,
|
|
25
|
+
"email": 1
|
|
26
|
+
}, {
|
|
27
|
+
background: true
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// 创建 _id 和 created 复合索引
|
|
31
|
+
await createIndexIfNotExists(collection, 'id_created', {
|
|
32
|
+
"_id": 1,
|
|
33
|
+
"created": 1
|
|
34
|
+
}, {
|
|
35
|
+
background: true
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// 创建 _id、created 和 modified 复合索引
|
|
39
|
+
await createIndexIfNotExists(collection, 'id_created_modified', {
|
|
40
|
+
"_id": 1,
|
|
41
|
+
"created": 1,
|
|
42
|
+
"modified": 1
|
|
43
|
+
}, {
|
|
44
|
+
background: true
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// 创建多字段复合索引
|
|
48
|
+
await createIndexIfNotExists(collection, 'primary_email_verified_locale_name_id_mobile', {
|
|
49
|
+
"primary_email_verified": 1,
|
|
50
|
+
"locale": 1,
|
|
51
|
+
"name": 1,
|
|
52
|
+
"_id": 1,
|
|
53
|
+
"mobile": 1
|
|
54
|
+
}, {
|
|
55
|
+
background: true
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// 创建包含 created 的多字段复合索引
|
|
59
|
+
await createIndexIfNotExists(collection, 'primary_email_verified_locale_name_id_mobile_created', {
|
|
60
|
+
"primary_email_verified": 1,
|
|
61
|
+
"locale": 1,
|
|
62
|
+
"name": 1,
|
|
63
|
+
"_id": 1,
|
|
64
|
+
"mobile": 1,
|
|
65
|
+
"created": 1
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// 创建包含 created 和 last_logon 的多字段复合索引
|
|
69
|
+
await createIndexIfNotExists(collection, 'primary_email_verified_locale_name_id_mobile_created_last_logon', {
|
|
70
|
+
"primary_email_verified": 1,
|
|
71
|
+
"locale": 1,
|
|
72
|
+
"name": 1,
|
|
73
|
+
"_id": 1,
|
|
74
|
+
"mobile": 1,
|
|
75
|
+
"created": 1,
|
|
76
|
+
"last_logon": 1
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// 创建 imo_uid 单字段索引
|
|
80
|
+
await createIndexIfNotExists(collection, 'imo_uid', {
|
|
81
|
+
"imo_uid": 1
|
|
82
|
+
}, {
|
|
83
|
+
background: true
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
// 创建 qq_open_id 单字段索引
|
|
87
|
+
await createIndexIfNotExists(collection, 'qq_open_id', {
|
|
88
|
+
"qq_open_id": 1
|
|
89
|
+
}, {
|
|
90
|
+
background: true
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// 创建 last_logon 单字段索引
|
|
94
|
+
await createIndexIfNotExists(collection, 'last_logon', {
|
|
95
|
+
"last_logon": 1
|
|
96
|
+
}, {
|
|
97
|
+
background: true
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// 创建 created 和 modified 复合索引
|
|
101
|
+
await createIndexIfNotExists(collection, 'created_modified', {
|
|
102
|
+
"created": 1,
|
|
103
|
+
"modified": 1
|
|
104
|
+
}, {
|
|
105
|
+
background: true
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// 创建 lastLogin 单字段索引
|
|
109
|
+
await createIndexIfNotExists(collection, 'lastLogin', {
|
|
110
|
+
"lastLogin": 1
|
|
111
|
+
}, {
|
|
112
|
+
background: true
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// 创建 status 单字段索引
|
|
116
|
+
await createIndexIfNotExists(collection, 'status', {
|
|
117
|
+
"status": 1
|
|
118
|
+
}, {
|
|
119
|
+
background: true
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// 创建 active 单字段索引
|
|
123
|
+
await createIndexIfNotExists(collection, 'active', {
|
|
124
|
+
"active": 1
|
|
125
|
+
}, {
|
|
126
|
+
background: true
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// 创建 type 单字段索引
|
|
130
|
+
await createIndexIfNotExists(collection, 'type', {
|
|
131
|
+
"type": 1
|
|
132
|
+
}, {
|
|
133
|
+
background: true
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// 创建微信服务相关复合索引
|
|
137
|
+
await createIndexIfNotExists(collection, 'weixin_openid', {
|
|
138
|
+
"services.weixin.openid.appid": 1,
|
|
139
|
+
"services.weixin.openid._id": 1
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
module.exports = {
|
|
144
|
+
run
|
|
145
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// webhooks_indexes.js
|
|
2
|
+
const {
|
|
3
|
+
createIndexIfNotExists,
|
|
4
|
+
getCollection
|
|
5
|
+
} = require('./default_db');
|
|
6
|
+
|
|
7
|
+
async function run() {
|
|
8
|
+
const collection = await getCollection('webhooks');
|
|
9
|
+
|
|
10
|
+
if (!collection) {
|
|
11
|
+
console.error('无法获取集合 webhooks');
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 创建 flow 单字段索引(使用 try-catch 处理可能的错误)
|
|
16
|
+
try {
|
|
17
|
+
await createIndexIfNotExists(collection, 'flow', {
|
|
18
|
+
"flow": 1
|
|
19
|
+
}, {
|
|
20
|
+
background: true
|
|
21
|
+
});
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.warn('创建 flow 索引时出错:', error.message);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
run
|
|
29
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: sunhaolin@hotoa.com
|
|
3
|
+
* @Date: 2023-01-10 11:28:54
|
|
4
|
+
* @LastEditors: 孙浩林 sunhaolin@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-08-27 11:00:46
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
8
|
+
const {
|
|
9
|
+
createIndexIfNotExists,
|
|
10
|
+
getCollection
|
|
11
|
+
} = require('./default_db');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
async function run() {
|
|
15
|
+
const flowsCollection = await getCollection('flows')
|
|
16
|
+
if (flowsCollection) {
|
|
17
|
+
await createIndexIfNotExists(flowsCollection, 'space_category_state_sort', {
|
|
18
|
+
space: 1,
|
|
19
|
+
category: 1,
|
|
20
|
+
state: 1,
|
|
21
|
+
sort_no: -1
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// 新增 categories 集合索引
|
|
26
|
+
const categoriesCollection = await getCollection('categories')
|
|
27
|
+
if (categoriesCollection) {
|
|
28
|
+
await createIndexIfNotExists(categoriesCollection, 'space_sort', {
|
|
29
|
+
space: 1,
|
|
30
|
+
sort_no: -1
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
module.exports = {
|
|
36
|
+
run
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-fields-indexs",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"node-schedule": "^2.0.0"
|
|
8
8
|
},
|
|
9
|
-
"private": false,
|
|
10
9
|
"publishConfig": {
|
|
11
10
|
"access": "public"
|
|
12
11
|
},
|
|
13
|
-
"gitHead": "
|
|
12
|
+
"gitHead": "20ea485d800dd4ad0a99c82b26000879c2f85741"
|
|
14
13
|
}
|
package/package.service.js
CHANGED
|
@@ -4,8 +4,8 @@ const serviceName = project.name;
|
|
|
4
4
|
const objectql = require("@steedos/objectql");
|
|
5
5
|
const schedule = require('node-schedule');
|
|
6
6
|
const path = require('path');
|
|
7
|
-
const Fiber = require("fibers");
|
|
8
7
|
const metaDataCore = require('@steedos/metadata-core');
|
|
8
|
+
const _ = require('lodash');
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {import('moleculer').Context} Context Moleculer's Context
|
|
11
11
|
* 软件包服务启动后也需要抛出事件。
|
|
@@ -26,14 +26,14 @@ module.exports = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Dependencies
|
|
28
28
|
*/
|
|
29
|
-
dependencies: [],
|
|
29
|
+
dependencies: ['@steedos/server'],
|
|
30
30
|
/**
|
|
31
31
|
* Actions
|
|
32
32
|
*/
|
|
33
33
|
actions: {
|
|
34
34
|
refreshIndexes: {
|
|
35
35
|
async handler(ctx) {
|
|
36
|
-
|
|
36
|
+
console.log(`refreshIndexes start`);
|
|
37
37
|
const objects = await ctx.call(`objects.getAll`, {});
|
|
38
38
|
for await (const object of objects) {
|
|
39
39
|
const objectAPIName = object.metadata.name;
|
|
@@ -42,24 +42,6 @@ module.exports = {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const filePatten = [
|
|
46
|
-
path.join(__dirname, 'meteor-collection-indexs', "*.object.js")
|
|
47
|
-
];
|
|
48
|
-
const matchedPaths = metaDataCore.syncMatchFiles(filePatten);
|
|
49
|
-
_.each(matchedPaths, (matchedPath) => {
|
|
50
|
-
try {
|
|
51
|
-
Fiber(function () {
|
|
52
|
-
try {
|
|
53
|
-
require(matchedPath);
|
|
54
|
-
} catch (error) {
|
|
55
|
-
console.error(`refresh indexe error: ${matchedPath}`, error);
|
|
56
|
-
}
|
|
57
|
-
}).run();
|
|
58
|
-
} catch (error) {
|
|
59
|
-
console.error(`refresh indexe error: ${matchedPath}`, error);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
45
|
const indexFilePatten = [
|
|
64
46
|
path.join(__dirname, 'collection-indexes', "*.index.js")
|
|
65
47
|
];
|
|
@@ -106,7 +88,7 @@ module.exports = {
|
|
|
106
88
|
let indexScheduleCron = "0 0 2 * * *"; // 默认每天凌晨2点
|
|
107
89
|
const steedosConfig = objectql.getSteedosConfig() || {};
|
|
108
90
|
const cron = steedosConfig.cron;
|
|
109
|
-
if (cron && cron.build_index) {
|
|
91
|
+
if (process.env.STEEDOS_CRON_ENABLED === 'true' && cron && cron.build_index) {
|
|
110
92
|
indexScheduleCron = cron.build_index;
|
|
111
93
|
}
|
|
112
94
|
if (indexScheduleCron) {
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
Meteor.startup(function () {
|
|
2
|
-
cfs.instances.files._ensureIndex({ "metadata.instance": 1 })
|
|
3
|
-
cfs.instances.files._ensureIndex({ "failures.copies.instances.doneTrying": 1 })
|
|
4
|
-
cfs.instances.files._ensureIndex({ "copies.instances": 1 })
|
|
5
|
-
cfs.instances.files._ensureIndex({ "uploadedAt": 1 })
|
|
6
|
-
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: baozhoutao@steedos.com
|
|
3
|
-
* @Date: 2022-03-28 09:35:35
|
|
4
|
-
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
-
* @LastEditTime: 2023-09-02 10:14:08
|
|
6
|
-
* @Description:
|
|
7
|
-
*/
|
|
8
|
-
if (Meteor.isServer && db.cms_categories) {
|
|
9
|
-
db.cms_categories._ensureIndex({
|
|
10
|
-
"site": 1,
|
|
11
|
-
"parent": 1
|
|
12
|
-
}, {
|
|
13
|
-
background: true
|
|
14
|
-
});
|
|
15
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: baozhoutao@steedos.com
|
|
3
|
-
* @Date: 2022-03-28 09:35:35
|
|
4
|
-
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
-
* @LastEditTime: 2023-08-31 10:27:02
|
|
6
|
-
* @Description:
|
|
7
|
-
*/
|
|
8
|
-
if (Meteor.isServer && db.cms_posts) {
|
|
9
|
-
db.cms_posts._ensureIndex({
|
|
10
|
-
"site": 1,
|
|
11
|
-
"tags": 1
|
|
12
|
-
}, {
|
|
13
|
-
background: true
|
|
14
|
-
});
|
|
15
|
-
db.cms_posts._ensureIndex({
|
|
16
|
-
"site": 1,
|
|
17
|
-
"category": 1
|
|
18
|
-
}, {
|
|
19
|
-
background: true
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
if (Meteor.isServer) {
|
|
2
|
-
db.flow_positions._ensureIndex({
|
|
3
|
-
"space": 1,
|
|
4
|
-
"created": 1
|
|
5
|
-
}, {
|
|
6
|
-
background: true
|
|
7
|
-
});
|
|
8
|
-
db.flow_positions._ensureIndex({
|
|
9
|
-
"space": 1,
|
|
10
|
-
"created": 1,
|
|
11
|
-
"modified": 1
|
|
12
|
-
}, {
|
|
13
|
-
background: true
|
|
14
|
-
});
|
|
15
|
-
db.flow_positions._ensureIndex({
|
|
16
|
-
"role": 1,
|
|
17
|
-
"org": 1,
|
|
18
|
-
"space": 1
|
|
19
|
-
}, {
|
|
20
|
-
background: true
|
|
21
|
-
});
|
|
22
|
-
db.flow_positions._ensureIndex({
|
|
23
|
-
"space": 1,
|
|
24
|
-
"users": 1
|
|
25
|
-
}, {
|
|
26
|
-
background: true
|
|
27
|
-
});
|
|
28
|
-
db.flow_positions._ensureIndex({
|
|
29
|
-
"space": 1,
|
|
30
|
-
"role": 1
|
|
31
|
-
}, {
|
|
32
|
-
background: true
|
|
33
|
-
});
|
|
34
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: sunhaolin@hotoa.com
|
|
3
|
-
* @Date: 2022-02-28 09:25:03
|
|
4
|
-
* @LastEditors: sunhaolin@hotoa.com
|
|
5
|
-
* @LastEditTime: 2022-11-30 14:10:20
|
|
6
|
-
* @Description:
|
|
7
|
-
*/
|
|
8
|
-
if (Meteor.isServer) {
|
|
9
|
-
|
|
10
|
-
db.flows._ensureIndex({
|
|
11
|
-
"space": 1,
|
|
12
|
-
"is_deleted": 1
|
|
13
|
-
}, {
|
|
14
|
-
background: true
|
|
15
|
-
});
|
|
16
|
-
db.flows._ensureIndex({
|
|
17
|
-
"role": 1,
|
|
18
|
-
"is_deleted": 1
|
|
19
|
-
}, {
|
|
20
|
-
background: true
|
|
21
|
-
});
|
|
22
|
-
db.flows._ensureIndex({
|
|
23
|
-
"space": 1,
|
|
24
|
-
"app": 1,
|
|
25
|
-
"created": 1
|
|
26
|
-
}, {
|
|
27
|
-
background: true
|
|
28
|
-
});
|
|
29
|
-
db.flows._ensureIndex({
|
|
30
|
-
"space": 1,
|
|
31
|
-
"app": 1,
|
|
32
|
-
"created": 1,
|
|
33
|
-
"current.modified": 1
|
|
34
|
-
}, {
|
|
35
|
-
background: true
|
|
36
|
-
});
|
|
37
|
-
db.flows._ensureIndex({
|
|
38
|
-
"name": 1,
|
|
39
|
-
"space": 1
|
|
40
|
-
}, {
|
|
41
|
-
background: true
|
|
42
|
-
});
|
|
43
|
-
db.flows._ensureIndex({
|
|
44
|
-
"form": 1,
|
|
45
|
-
"is_deleted": 1
|
|
46
|
-
}, {
|
|
47
|
-
background: true
|
|
48
|
-
});
|
|
49
|
-
db.flows._ensureIndex({
|
|
50
|
-
"current.steps.approver_roles": 1,
|
|
51
|
-
"space": 1,
|
|
52
|
-
"is_deleted": 1
|
|
53
|
-
}, {
|
|
54
|
-
background: true
|
|
55
|
-
});
|
|
56
|
-
db.flows._ensureIndex({
|
|
57
|
-
"_id": 1,
|
|
58
|
-
"space": 1,
|
|
59
|
-
"is_deleted": 1
|
|
60
|
-
}, {
|
|
61
|
-
background: true
|
|
62
|
-
});
|
|
63
|
-
db.flows._ensureIndex({
|
|
64
|
-
"space": 1,
|
|
65
|
-
"form": 1
|
|
66
|
-
}, {
|
|
67
|
-
background: true
|
|
68
|
-
});
|
|
69
|
-
try {
|
|
70
|
-
db.flows._ensureIndex({
|
|
71
|
-
"form": 1
|
|
72
|
-
}, {
|
|
73
|
-
background: true
|
|
74
|
-
});
|
|
75
|
-
} catch (error) {
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
db.flows._ensureIndex({
|
|
79
|
-
"space": 1,
|
|
80
|
-
"form": 1,
|
|
81
|
-
"state:": 1
|
|
82
|
-
}, {
|
|
83
|
-
background: true
|
|
84
|
-
});
|
|
85
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: sunhaolin@hotoa.com
|
|
3
|
-
* @Date: 2022-02-28 09:25:03
|
|
4
|
-
* @LastEditors: sunhaolin@hotoa.com
|
|
5
|
-
* @LastEditTime: 2022-05-29 11:40:25
|
|
6
|
-
* @Description:
|
|
7
|
-
*/
|
|
8
|
-
if (Meteor.isServer) {
|
|
9
|
-
db.forms._ensureIndex({
|
|
10
|
-
"space": 1,
|
|
11
|
-
"is_deleted": 1
|
|
12
|
-
}, {
|
|
13
|
-
background: true
|
|
14
|
-
});
|
|
15
|
-
db.forms._ensureIndex({
|
|
16
|
-
"space": 1,
|
|
17
|
-
"app": 1,
|
|
18
|
-
"created": 1
|
|
19
|
-
}, {
|
|
20
|
-
background: true
|
|
21
|
-
});
|
|
22
|
-
db.forms._ensureIndex({
|
|
23
|
-
"space": 1,
|
|
24
|
-
"app": 1,
|
|
25
|
-
"created": 1,
|
|
26
|
-
"current.modified": 1
|
|
27
|
-
}, {
|
|
28
|
-
background: true
|
|
29
|
-
});
|
|
30
|
-
db.forms._ensureIndex({
|
|
31
|
-
"name": 1,
|
|
32
|
-
"space": 1
|
|
33
|
-
}, {
|
|
34
|
-
background: true
|
|
35
|
-
});
|
|
36
|
-
db.forms._ensureIndex({
|
|
37
|
-
"_id": 1,
|
|
38
|
-
"space": 1
|
|
39
|
-
}, {
|
|
40
|
-
background: true
|
|
41
|
-
});
|
|
42
|
-
db.forms._ensureIndex({
|
|
43
|
-
"space": 1,
|
|
44
|
-
"state": 1
|
|
45
|
-
}, {
|
|
46
|
-
background: true
|
|
47
|
-
});
|
|
48
|
-
}
|