mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: upgrade: fix message
This commit is contained in:
1 parent
258a677e4f
commit
31f107354c
1 file changed
+10
@@ -530,6 +530,16 @@ const scripts: UpgradeScript[] = [
|
|||||||
{ $inc: { priv: -list[key] } },
|
{ $inc: { priv: -list[key] } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
async function _75_76() {
|
||||||
|
const messages = await db.collection('message').find({ content: { $type: 'object' } }).toArray();
|
||||||
|
for (const m of messages) {
|
||||||
|
let content = '';
|
||||||
|
for (const key in m) content += m[key];
|
||||||
|
await db.collection('message').updateOne({ _id: m._id }, { $set: { content } });
|
||||||
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user