File size: 654 Bytes
98b1c51
4dbcbb6
 
29b7d2a
98b1c51
4dbcbb6
 
 
 
98b1c51
 
4dbcbb6
 
29b7d2a
4dbcbb6
 
29b7d2a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import type { ObjectId } from "mongodb";

import updateSearchAssistant from "./01-update-search-assistants";
import updateAssistantsModels from "./02-update-assistants-models";
import type { Database } from "$lib/server/database";

export interface Migration {
	_id: ObjectId;
	name: string;
	up: (client: Database) => Promise<boolean>;
	down?: (client: Database) => Promise<boolean>;
	runForFreshInstall?: "only" | "never"; // leave unspecified to run for both
	runForHuggingChat?: "only" | "never"; // leave unspecified to run for both
	runEveryTime?: boolean;
}

export const migrations: Migration[] = [updateSearchAssistant, updateAssistantsModels];