chat-ui-energy / src /lib /migrations /routines /07-reset-tools-in-settings.ts
nsarrazin's picture
nsarrazin HF Staff
fix(migrations): run tools migration for chat-ui too
7cbdf0a unverified
raw
history blame
411 Bytes
import type { Migration } from ".";
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
const resetTools: Migration = {
_id: new ObjectId("000000000007"),
name: "Reset tools to empty",
up: async () => {
const { settings } = collections;
await settings.updateMany({}, { $set: { tools: [] } });
return true;
},
runEveryTime: false,
};
export default resetTools;