mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-29 18:37:58 +03:00
22 lines
359 B
TypeScript
22 lines
359 B
TypeScript
import db from "external/mongo/db";
|
|
import { Random20Hex } from "utils/misc";
|
|
|
|
(async () => {
|
|
const docs = await db.charts.iidx.find({ version: "inf" }, { projectID: true });
|
|
|
|
for (const doc of docs) {
|
|
await db.charts.iidx.update(
|
|
{
|
|
_id: doc._id,
|
|
},
|
|
{
|
|
$set: {
|
|
chartID: Random20Hex(),
|
|
},
|
|
}
|
|
);
|
|
}
|
|
|
|
console.log("done");
|
|
})();
|