1
// ************************************** //
2
// ******* Version 1 - 2023-11-14 ******* //
3
// ************************************** //
4
// - Initial database schema with `files` table
6
export const dbSchemaV1 = {
7
files: '&id, name, fileType, saveMode',
10
// ************************************** //
11
// ******* Version 2 - 2023-11-27 ******* //
12
// ************************************** //
13
// - Added `sessions` 、`messages` 、`topics` tables
14
// - Added `createdAt` and `updatedAt` fields to all
15
export const dbSchemaV2 = {
16
files: '&id, name, fileType, saveMode, createdAt, updatedAt, messageId, sessionId',
19
'&id, role, content, fromModel, favorite, plugin.identifier, plugin.apiName, translate.content, createdAt, updatedAt, sessionId, topicId, quotaId, parentId, [sessionId+topicId]',
20
sessions: '&id, type, group, meta.title, meta.description, meta.tags, createdAt, updatedAt',
21
topics: '&id, title, favorite, createdAt, updatedAt, sessionId',
24
// ************************************** //
25
// ******* Version 3 - 2023-12-06 ******* //
26
// ************************************** //
27
// - Added `plugins` table
29
export const dbSchemaV3 = {
32
'&identifier, type, manifest.type, manifest.meta.title, manifest.meta.description, manifest.meta.author, createdAt, updatedAt',
35
// ************************************** //
36
// ******* Version 4 - 2024-01-21 ******* //
37
// ************************************** //
38
// - Added `sessionGroups` table
39
// - Add `pinned` to sessions table
41
export const dbSchemaV4 = {
43
sessionGroups: '&id, name, sort, createdAt, updatedAt',
45
'&id, type, group, pinned, meta.title, meta.description, meta.tags, createdAt, updatedAt',
48
// ************************************** //
49
// ******* Version 5 - 2024-01-29 ******* //
50
// ************************************** //
51
// - Added `users` table
53
export const dbSchemaV5 = {
58
// ************************************** //
59
// ******* Version 6 - 2024-02-27 ******* //
60
// ************************************** //
61
// - Added uuid to `users` table
62
// - Added traceId to `messages` table
63
export const dbSchemaV6 = {
66
'&id, role, content, fromModel, favorite, plugin.identifier, plugin.apiName, translate.content, createdAt, updatedAt, sessionId, topicId, quotaId, parentId, [sessionId+topicId], traceId',
70
// ************************************** //
71
// ******* Version 7 - 2024-03-14 ******* //
72
// ************************************** //
73
// - Added id to `plugins` table
74
export const dbSchemaV7 = {
77
'&identifier, id, type, manifest.type, manifest.meta.title, manifest.meta.description, manifest.meta.author, createdAt, updatedAt',
80
// ************************************** //
81
// ******* Version 9 - 2024-05-11 ******* //
82
// ************************************** //
83
// - Added tool_call_id to `messages` table
84
export const dbSchemaV9 = {
87
'&id, role, content, fromModel, favorite, tool_call_id, plugin.identifier, plugin.apiName, translate.content, createdAt, updatedAt, sessionId, topicId, quotaId, parentId, [sessionId+topicId], traceId',