mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
!UNSTABLE 优化数据库结构,为domain功能准备
This commit is contained in:
1 parent
7d27e56018
commit
fff2172c38
40 files changed
+1411
-1012
No files matched your search
@@ -55,7 +55,7 @@ function getMulti(uid) {
|
||||
return coll.find({ $or: [{ from: uid }, { to: uid }] });
|
||||
}
|
||||
|
||||
function index() {
|
||||
function ensureIndexes() {
|
||||
return Promise.all([
|
||||
coll.createIndex({ to: 1, _id: -1 }),
|
||||
coll.createIndex({ from: 1, _id: -1 }),
|
||||
@@ -69,5 +69,5 @@ global.Hydro.model.message = module.exports = {
|
||||
getMany,
|
||||
getMulti,
|
||||
send,
|
||||
index,
|
||||
ensureIndexes,
|
||||
};
|
||||
Reference in new issue
Block a user