lobe-chat

Форк
0
88 строк · 3.2 Кб
1
// ************************************** //
2
// ******* Version 1 - 2023-11-14 ******* //
3
// ************************************** //
4
// - Initial database schema with `files` table
5

6
export const dbSchemaV1 = {
7
  files: '&id, name, fileType, saveMode',
8
};
9

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',
17

18
  messages:
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',
22
};
23

24
// ************************************** //
25
// ******* Version 3 - 2023-12-06 ******* //
26
// ************************************** //
27
// - Added `plugins` table
28

29
export const dbSchemaV3 = {
30
  ...dbSchemaV2,
31
  plugins:
32
    '&identifier, type, manifest.type, manifest.meta.title, manifest.meta.description, manifest.meta.author, createdAt, updatedAt',
33
};
34

35
// ************************************** //
36
// ******* Version 4 - 2024-01-21 ******* //
37
// ************************************** //
38
// - Added `sessionGroups` table
39
// - Add `pinned` to sessions table
40

41
export const dbSchemaV4 = {
42
  ...dbSchemaV3,
43
  sessionGroups: '&id, name, sort, createdAt, updatedAt',
44
  sessions:
45
    '&id, type, group, pinned, meta.title, meta.description, meta.tags, createdAt, updatedAt',
46
};
47

48
// ************************************** //
49
// ******* Version 5 - 2024-01-29 ******* //
50
// ************************************** //
51
// - Added `users` table
52

53
export const dbSchemaV5 = {
54
  ...dbSchemaV4,
55
  users: '++id',
56
};
57

58
// ************************************** //
59
// ******* Version 6 - 2024-02-27 ******* //
60
// ************************************** //
61
// - Added uuid to `users` table
62
// - Added traceId to `messages` table
63
export const dbSchemaV6 = {
64
  ...dbSchemaV5,
65
  messages:
66
    '&id, role, content, fromModel, favorite, plugin.identifier, plugin.apiName, translate.content, createdAt, updatedAt, sessionId, topicId, quotaId, parentId, [sessionId+topicId], traceId',
67
  users: '++id, uuid',
68
};
69

70
// ************************************** //
71
// ******* Version 7 - 2024-03-14 ******* //
72
// ************************************** //
73
// - Added id to `plugins` table
74
export const dbSchemaV7 = {
75
  ...dbSchemaV6,
76
  plugins:
77
    '&identifier, id, type, manifest.type, manifest.meta.title, manifest.meta.description, manifest.meta.author, createdAt, updatedAt',
78
};
79

80
// ************************************** //
81
// ******* Version 9 - 2024-05-11 ******* //
82
// ************************************** //
83
// - Added tool_call_id to `messages` table
84
export const dbSchemaV9 = {
85
  ...dbSchemaV7,
86
  messages:
87
    '&id, role, content, fromModel, favorite, tool_call_id, plugin.identifier, plugin.apiName, translate.content, createdAt, updatedAt, sessionId, topicId, quotaId, parentId, [sessionId+topicId], traceId',
88
};
89

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.