File size: 423 Bytes
8d88d9b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import type { Migration } from ".";
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";

const resetTools: Migration = {
	_id: new ObjectId("000000000000000000000007"),
	name: "Reset tools to empty",
	up: async () => {
		const { settings } = collections;

		await settings.updateMany({}, { $set: { tools: [] } });

		return true;
	},
	runEveryTime: false,
};

export default resetTools;