nsarrazin HF Staff commited on
Commit
7cbdf0a
·
unverified ·
1 Parent(s): a329687

fix(migrations): run tools migration for chat-ui too

Browse files
src/lib/migrations/routines/07-reset-tools-in-settings.ts CHANGED
@@ -13,7 +13,6 @@ const resetTools: Migration = {
13
  return true;
14
  },
15
  runEveryTime: false,
16
- runForHuggingChat: "only",
17
  };
18
 
19
  export default resetTools;
 
13
  return true;
14
  },
15
  runEveryTime: false,
 
16
  };
17
 
18
  export default resetTools;
src/lib/migrations/routines/08-reset-tools-in-settings-2.ts DELETED
@@ -1,19 +0,0 @@
1
- import type { Migration } from ".";
2
- import { collections } from "$lib/server/database";
3
- import { ObjectId } from "mongodb";
4
-
5
- const resetTools2: Migration = {
6
- _id: new ObjectId("000000000008"),
7
- name: "Reset tools to empty",
8
- up: async () => {
9
- const { settings } = collections;
10
-
11
- await settings.updateMany({}, { $set: { tools: [] } });
12
-
13
- return true;
14
- },
15
- runEveryTime: false,
16
- runForHuggingChat: "only",
17
- };
18
-
19
- export default resetTools2;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/lib/migrations/routines/index.ts CHANGED
@@ -8,7 +8,6 @@ import updateMessageUpdates from "./04-update-message-updates";
8
  import updateMessageFiles from "./05-update-message-files";
9
  import trimMessageUpdates from "./06-trim-message-updates";
10
  import resetTools from "./07-reset-tools-in-settings";
11
- import resetTools2 from "./08-reset-tools-in-settings-2";
12
 
13
  export interface Migration {
14
  _id: ObjectId;
@@ -28,5 +27,4 @@ export const migrations: Migration[] = [
28
  updateMessageFiles,
29
  trimMessageUpdates,
30
  resetTools,
31
- resetTools2,
32
  ];
 
8
  import updateMessageFiles from "./05-update-message-files";
9
  import trimMessageUpdates from "./06-trim-message-updates";
10
  import resetTools from "./07-reset-tools-in-settings";
 
11
 
12
  export interface Migration {
13
  _id: ObjectId;
 
27
  updateMessageFiles,
28
  trimMessageUpdates,
29
  resetTools,
 
30
  ];