@ykurilov/agent-chat-storage-sqlite 0.0.0-stage → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1300 -0
- package/LICENSE +21 -0
- package/README.md +33 -2
- package/dist/index.js +817 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/schema.d.ts +1797 -0
- package/dist/types/sqlite-storage.d.ts +15 -0
- package/drizzle/0000_init.sql +29 -0
- package/drizzle/0001_message_seq.sql +5 -0
- package/drizzle/0002_chat_reasoning.sql +1 -0
- package/drizzle/0003_compactions.sql +17 -0
- package/drizzle/0004_branch_selections.sql +11 -0
- package/drizzle/0005_chat_title.sql +22 -0
- package/drizzle/0006_usage_records.sql +19 -0
- package/drizzle/0007_user_model_choices.sql +7 -0
- package/drizzle/0008_voice_dialog.sql +7 -0
- package/drizzle/0009_memory_notes.sql +11 -0
- package/drizzle/0010_memory_optimization.sql +15 -0
- package/drizzle/0011_usage_estimated.sql +1 -0
- package/drizzle/0012_message_alive_at.sql +1 -0
- package/drizzle/0013_spending_limit_states.sql +6 -0
- package/drizzle/0014_chat_origin.sql +1 -0
- package/drizzle/0015_chat_subject_after_turn.sql +5 -0
- package/drizzle/0016_chat_closed.sql +1 -0
- package/drizzle/0017_chat_turn_leases.sql +5 -0
- package/drizzle/meta/0000_snapshot.json +211 -0
- package/drizzle/meta/0001_snapshot.json +227 -0
- package/drizzle/meta/0002_snapshot.json +234 -0
- package/drizzle/meta/0003_snapshot.json +352 -0
- package/drizzle/meta/0004_snapshot.json +428 -0
- package/drizzle/meta/0005_snapshot.json +435 -0
- package/drizzle/meta/0006_snapshot.json +560 -0
- package/drizzle/meta/0007_snapshot.json +605 -0
- package/drizzle/meta/0008_snapshot.json +643 -0
- package/drizzle/meta/0009_snapshot.json +712 -0
- package/drizzle/meta/0010_snapshot.json +810 -0
- package/drizzle/meta/0011_snapshot.json +818 -0
- package/drizzle/meta/0012_snapshot.json +825 -0
- package/drizzle/meta/0013_snapshot.json +863 -0
- package/drizzle/meta/0014_snapshot.json +870 -0
- package/drizzle/meta/0015_snapshot.json +907 -0
- package/drizzle/meta/0016_snapshot.json +914 -0
- package/drizzle/meta/0017_snapshot.json +945 -0
- package/drizzle/meta/_journal.json +132 -0
- package/package.json +44 -3
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "f14fe2f6-af64-472b-bbf7-e314676e8d43",
|
|
5
|
+
"prevId": "69158484-74d3-4857-a2b0-782512dadeb1",
|
|
6
|
+
"tables": {
|
|
7
|
+
"chats": {
|
|
8
|
+
"name": "chats",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"owner_id": {
|
|
18
|
+
"name": "owner_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"model_id": {
|
|
25
|
+
"name": "model_id",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"provider_id": {
|
|
32
|
+
"name": "provider_id",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"reasoning": {
|
|
39
|
+
"name": "reasoning",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": false,
|
|
43
|
+
"autoincrement": false
|
|
44
|
+
},
|
|
45
|
+
"created_at": {
|
|
46
|
+
"name": "created_at",
|
|
47
|
+
"type": "text",
|
|
48
|
+
"primaryKey": false,
|
|
49
|
+
"notNull": true,
|
|
50
|
+
"autoincrement": false
|
|
51
|
+
},
|
|
52
|
+
"updated_at": {
|
|
53
|
+
"name": "updated_at",
|
|
54
|
+
"type": "text",
|
|
55
|
+
"primaryKey": false,
|
|
56
|
+
"notNull": true,
|
|
57
|
+
"autoincrement": false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"indexes": {
|
|
61
|
+
"chats_owner_updated_idx": {
|
|
62
|
+
"name": "chats_owner_updated_idx",
|
|
63
|
+
"columns": [
|
|
64
|
+
"owner_id",
|
|
65
|
+
"updated_at"
|
|
66
|
+
],
|
|
67
|
+
"isUnique": false
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"foreignKeys": {},
|
|
71
|
+
"compositePrimaryKeys": {},
|
|
72
|
+
"uniqueConstraints": {},
|
|
73
|
+
"checkConstraints": {}
|
|
74
|
+
},
|
|
75
|
+
"messages": {
|
|
76
|
+
"name": "messages",
|
|
77
|
+
"columns": {
|
|
78
|
+
"id": {
|
|
79
|
+
"name": "id",
|
|
80
|
+
"type": "text",
|
|
81
|
+
"primaryKey": true,
|
|
82
|
+
"notNull": true,
|
|
83
|
+
"autoincrement": false
|
|
84
|
+
},
|
|
85
|
+
"chat_id": {
|
|
86
|
+
"name": "chat_id",
|
|
87
|
+
"type": "text",
|
|
88
|
+
"primaryKey": false,
|
|
89
|
+
"notNull": true,
|
|
90
|
+
"autoincrement": false
|
|
91
|
+
},
|
|
92
|
+
"parent_id": {
|
|
93
|
+
"name": "parent_id",
|
|
94
|
+
"type": "text",
|
|
95
|
+
"primaryKey": false,
|
|
96
|
+
"notNull": false,
|
|
97
|
+
"autoincrement": false
|
|
98
|
+
},
|
|
99
|
+
"role": {
|
|
100
|
+
"name": "role",
|
|
101
|
+
"type": "text",
|
|
102
|
+
"primaryKey": false,
|
|
103
|
+
"notNull": true,
|
|
104
|
+
"autoincrement": false
|
|
105
|
+
},
|
|
106
|
+
"parts": {
|
|
107
|
+
"name": "parts",
|
|
108
|
+
"type": "text",
|
|
109
|
+
"primaryKey": false,
|
|
110
|
+
"notNull": true,
|
|
111
|
+
"autoincrement": false
|
|
112
|
+
},
|
|
113
|
+
"format_version": {
|
|
114
|
+
"name": "format_version",
|
|
115
|
+
"type": "integer",
|
|
116
|
+
"primaryKey": false,
|
|
117
|
+
"notNull": true,
|
|
118
|
+
"autoincrement": false
|
|
119
|
+
},
|
|
120
|
+
"status": {
|
|
121
|
+
"name": "status",
|
|
122
|
+
"type": "text",
|
|
123
|
+
"primaryKey": false,
|
|
124
|
+
"notNull": true,
|
|
125
|
+
"autoincrement": false
|
|
126
|
+
},
|
|
127
|
+
"model_id": {
|
|
128
|
+
"name": "model_id",
|
|
129
|
+
"type": "text",
|
|
130
|
+
"primaryKey": false,
|
|
131
|
+
"notNull": false,
|
|
132
|
+
"autoincrement": false
|
|
133
|
+
},
|
|
134
|
+
"provider_id": {
|
|
135
|
+
"name": "provider_id",
|
|
136
|
+
"type": "text",
|
|
137
|
+
"primaryKey": false,
|
|
138
|
+
"notNull": false,
|
|
139
|
+
"autoincrement": false
|
|
140
|
+
},
|
|
141
|
+
"usage": {
|
|
142
|
+
"name": "usage",
|
|
143
|
+
"type": "text",
|
|
144
|
+
"primaryKey": false,
|
|
145
|
+
"notNull": false,
|
|
146
|
+
"autoincrement": false
|
|
147
|
+
},
|
|
148
|
+
"reasoning_durations_ms": {
|
|
149
|
+
"name": "reasoning_durations_ms",
|
|
150
|
+
"type": "text",
|
|
151
|
+
"primaryKey": false,
|
|
152
|
+
"notNull": true,
|
|
153
|
+
"autoincrement": false
|
|
154
|
+
},
|
|
155
|
+
"error": {
|
|
156
|
+
"name": "error",
|
|
157
|
+
"type": "text",
|
|
158
|
+
"primaryKey": false,
|
|
159
|
+
"notNull": false,
|
|
160
|
+
"autoincrement": false
|
|
161
|
+
},
|
|
162
|
+
"created_at": {
|
|
163
|
+
"name": "created_at",
|
|
164
|
+
"type": "text",
|
|
165
|
+
"primaryKey": false,
|
|
166
|
+
"notNull": true,
|
|
167
|
+
"autoincrement": false
|
|
168
|
+
},
|
|
169
|
+
"seq": {
|
|
170
|
+
"name": "seq",
|
|
171
|
+
"type": "integer",
|
|
172
|
+
"primaryKey": false,
|
|
173
|
+
"notNull": true,
|
|
174
|
+
"autoincrement": false,
|
|
175
|
+
"default": 0
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"indexes": {
|
|
179
|
+
"messages_chat_created_idx": {
|
|
180
|
+
"name": "messages_chat_created_idx",
|
|
181
|
+
"columns": [
|
|
182
|
+
"chat_id",
|
|
183
|
+
"created_at",
|
|
184
|
+
"seq"
|
|
185
|
+
],
|
|
186
|
+
"isUnique": false
|
|
187
|
+
},
|
|
188
|
+
"messages_seq_idx": {
|
|
189
|
+
"name": "messages_seq_idx",
|
|
190
|
+
"columns": [
|
|
191
|
+
"seq"
|
|
192
|
+
],
|
|
193
|
+
"isUnique": true
|
|
194
|
+
},
|
|
195
|
+
"messages_streaming_idx": {
|
|
196
|
+
"name": "messages_streaming_idx",
|
|
197
|
+
"columns": [
|
|
198
|
+
"status"
|
|
199
|
+
],
|
|
200
|
+
"isUnique": false,
|
|
201
|
+
"where": "\"messages\".\"status\" = 'streaming'"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"foreignKeys": {
|
|
205
|
+
"messages_chat_id_chats_id_fk": {
|
|
206
|
+
"name": "messages_chat_id_chats_id_fk",
|
|
207
|
+
"tableFrom": "messages",
|
|
208
|
+
"tableTo": "chats",
|
|
209
|
+
"columnsFrom": [
|
|
210
|
+
"chat_id"
|
|
211
|
+
],
|
|
212
|
+
"columnsTo": [
|
|
213
|
+
"id"
|
|
214
|
+
],
|
|
215
|
+
"onDelete": "cascade",
|
|
216
|
+
"onUpdate": "no action"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"compositePrimaryKeys": {},
|
|
220
|
+
"uniqueConstraints": {},
|
|
221
|
+
"checkConstraints": {}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"views": {},
|
|
225
|
+
"enums": {},
|
|
226
|
+
"_meta": {
|
|
227
|
+
"schemas": {},
|
|
228
|
+
"tables": {},
|
|
229
|
+
"columns": {}
|
|
230
|
+
},
|
|
231
|
+
"internal": {
|
|
232
|
+
"indexes": {}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "076c5557-479a-4ef5-8dc9-75f997d199e2",
|
|
5
|
+
"prevId": "f14fe2f6-af64-472b-bbf7-e314676e8d43",
|
|
6
|
+
"tables": {
|
|
7
|
+
"chats": {
|
|
8
|
+
"name": "chats",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"owner_id": {
|
|
18
|
+
"name": "owner_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"model_id": {
|
|
25
|
+
"name": "model_id",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"provider_id": {
|
|
32
|
+
"name": "provider_id",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"reasoning": {
|
|
39
|
+
"name": "reasoning",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": false,
|
|
43
|
+
"autoincrement": false
|
|
44
|
+
},
|
|
45
|
+
"created_at": {
|
|
46
|
+
"name": "created_at",
|
|
47
|
+
"type": "text",
|
|
48
|
+
"primaryKey": false,
|
|
49
|
+
"notNull": true,
|
|
50
|
+
"autoincrement": false
|
|
51
|
+
},
|
|
52
|
+
"updated_at": {
|
|
53
|
+
"name": "updated_at",
|
|
54
|
+
"type": "text",
|
|
55
|
+
"primaryKey": false,
|
|
56
|
+
"notNull": true,
|
|
57
|
+
"autoincrement": false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"indexes": {
|
|
61
|
+
"chats_owner_updated_idx": {
|
|
62
|
+
"name": "chats_owner_updated_idx",
|
|
63
|
+
"columns": [
|
|
64
|
+
"owner_id",
|
|
65
|
+
"updated_at"
|
|
66
|
+
],
|
|
67
|
+
"isUnique": false
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"foreignKeys": {},
|
|
71
|
+
"compositePrimaryKeys": {},
|
|
72
|
+
"uniqueConstraints": {},
|
|
73
|
+
"checkConstraints": {}
|
|
74
|
+
},
|
|
75
|
+
"compactions": {
|
|
76
|
+
"name": "compactions",
|
|
77
|
+
"columns": {
|
|
78
|
+
"id": {
|
|
79
|
+
"name": "id",
|
|
80
|
+
"type": "text",
|
|
81
|
+
"primaryKey": true,
|
|
82
|
+
"notNull": true,
|
|
83
|
+
"autoincrement": false
|
|
84
|
+
},
|
|
85
|
+
"chat_id": {
|
|
86
|
+
"name": "chat_id",
|
|
87
|
+
"type": "text",
|
|
88
|
+
"primaryKey": false,
|
|
89
|
+
"notNull": true,
|
|
90
|
+
"autoincrement": false
|
|
91
|
+
},
|
|
92
|
+
"from_message_id": {
|
|
93
|
+
"name": "from_message_id",
|
|
94
|
+
"type": "text",
|
|
95
|
+
"primaryKey": false,
|
|
96
|
+
"notNull": true,
|
|
97
|
+
"autoincrement": false
|
|
98
|
+
},
|
|
99
|
+
"through_message_id": {
|
|
100
|
+
"name": "through_message_id",
|
|
101
|
+
"type": "text",
|
|
102
|
+
"primaryKey": false,
|
|
103
|
+
"notNull": true,
|
|
104
|
+
"autoincrement": false
|
|
105
|
+
},
|
|
106
|
+
"summary": {
|
|
107
|
+
"name": "summary",
|
|
108
|
+
"type": "text",
|
|
109
|
+
"primaryKey": false,
|
|
110
|
+
"notNull": true,
|
|
111
|
+
"autoincrement": false
|
|
112
|
+
},
|
|
113
|
+
"summary_tokens": {
|
|
114
|
+
"name": "summary_tokens",
|
|
115
|
+
"type": "integer",
|
|
116
|
+
"primaryKey": false,
|
|
117
|
+
"notNull": true,
|
|
118
|
+
"autoincrement": false
|
|
119
|
+
},
|
|
120
|
+
"model_id": {
|
|
121
|
+
"name": "model_id",
|
|
122
|
+
"type": "text",
|
|
123
|
+
"primaryKey": false,
|
|
124
|
+
"notNull": true,
|
|
125
|
+
"autoincrement": false
|
|
126
|
+
},
|
|
127
|
+
"provider_id": {
|
|
128
|
+
"name": "provider_id",
|
|
129
|
+
"type": "text",
|
|
130
|
+
"primaryKey": false,
|
|
131
|
+
"notNull": true,
|
|
132
|
+
"autoincrement": false
|
|
133
|
+
},
|
|
134
|
+
"usage": {
|
|
135
|
+
"name": "usage",
|
|
136
|
+
"type": "text",
|
|
137
|
+
"primaryKey": false,
|
|
138
|
+
"notNull": false,
|
|
139
|
+
"autoincrement": false
|
|
140
|
+
},
|
|
141
|
+
"created_at": {
|
|
142
|
+
"name": "created_at",
|
|
143
|
+
"type": "text",
|
|
144
|
+
"primaryKey": false,
|
|
145
|
+
"notNull": true,
|
|
146
|
+
"autoincrement": false
|
|
147
|
+
},
|
|
148
|
+
"seq": {
|
|
149
|
+
"name": "seq",
|
|
150
|
+
"type": "integer",
|
|
151
|
+
"primaryKey": false,
|
|
152
|
+
"notNull": true,
|
|
153
|
+
"autoincrement": false,
|
|
154
|
+
"default": 0
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"indexes": {
|
|
158
|
+
"compactions_chat_seq_idx": {
|
|
159
|
+
"name": "compactions_chat_seq_idx",
|
|
160
|
+
"columns": [
|
|
161
|
+
"chat_id",
|
|
162
|
+
"seq"
|
|
163
|
+
],
|
|
164
|
+
"isUnique": false
|
|
165
|
+
},
|
|
166
|
+
"compactions_seq_idx": {
|
|
167
|
+
"name": "compactions_seq_idx",
|
|
168
|
+
"columns": [
|
|
169
|
+
"seq"
|
|
170
|
+
],
|
|
171
|
+
"isUnique": true
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"foreignKeys": {
|
|
175
|
+
"compactions_chat_id_chats_id_fk": {
|
|
176
|
+
"name": "compactions_chat_id_chats_id_fk",
|
|
177
|
+
"tableFrom": "compactions",
|
|
178
|
+
"tableTo": "chats",
|
|
179
|
+
"columnsFrom": [
|
|
180
|
+
"chat_id"
|
|
181
|
+
],
|
|
182
|
+
"columnsTo": [
|
|
183
|
+
"id"
|
|
184
|
+
],
|
|
185
|
+
"onDelete": "cascade",
|
|
186
|
+
"onUpdate": "no action"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"compositePrimaryKeys": {},
|
|
190
|
+
"uniqueConstraints": {},
|
|
191
|
+
"checkConstraints": {}
|
|
192
|
+
},
|
|
193
|
+
"messages": {
|
|
194
|
+
"name": "messages",
|
|
195
|
+
"columns": {
|
|
196
|
+
"id": {
|
|
197
|
+
"name": "id",
|
|
198
|
+
"type": "text",
|
|
199
|
+
"primaryKey": true,
|
|
200
|
+
"notNull": true,
|
|
201
|
+
"autoincrement": false
|
|
202
|
+
},
|
|
203
|
+
"chat_id": {
|
|
204
|
+
"name": "chat_id",
|
|
205
|
+
"type": "text",
|
|
206
|
+
"primaryKey": false,
|
|
207
|
+
"notNull": true,
|
|
208
|
+
"autoincrement": false
|
|
209
|
+
},
|
|
210
|
+
"parent_id": {
|
|
211
|
+
"name": "parent_id",
|
|
212
|
+
"type": "text",
|
|
213
|
+
"primaryKey": false,
|
|
214
|
+
"notNull": false,
|
|
215
|
+
"autoincrement": false
|
|
216
|
+
},
|
|
217
|
+
"role": {
|
|
218
|
+
"name": "role",
|
|
219
|
+
"type": "text",
|
|
220
|
+
"primaryKey": false,
|
|
221
|
+
"notNull": true,
|
|
222
|
+
"autoincrement": false
|
|
223
|
+
},
|
|
224
|
+
"parts": {
|
|
225
|
+
"name": "parts",
|
|
226
|
+
"type": "text",
|
|
227
|
+
"primaryKey": false,
|
|
228
|
+
"notNull": true,
|
|
229
|
+
"autoincrement": false
|
|
230
|
+
},
|
|
231
|
+
"format_version": {
|
|
232
|
+
"name": "format_version",
|
|
233
|
+
"type": "integer",
|
|
234
|
+
"primaryKey": false,
|
|
235
|
+
"notNull": true,
|
|
236
|
+
"autoincrement": false
|
|
237
|
+
},
|
|
238
|
+
"status": {
|
|
239
|
+
"name": "status",
|
|
240
|
+
"type": "text",
|
|
241
|
+
"primaryKey": false,
|
|
242
|
+
"notNull": true,
|
|
243
|
+
"autoincrement": false
|
|
244
|
+
},
|
|
245
|
+
"model_id": {
|
|
246
|
+
"name": "model_id",
|
|
247
|
+
"type": "text",
|
|
248
|
+
"primaryKey": false,
|
|
249
|
+
"notNull": false,
|
|
250
|
+
"autoincrement": false
|
|
251
|
+
},
|
|
252
|
+
"provider_id": {
|
|
253
|
+
"name": "provider_id",
|
|
254
|
+
"type": "text",
|
|
255
|
+
"primaryKey": false,
|
|
256
|
+
"notNull": false,
|
|
257
|
+
"autoincrement": false
|
|
258
|
+
},
|
|
259
|
+
"usage": {
|
|
260
|
+
"name": "usage",
|
|
261
|
+
"type": "text",
|
|
262
|
+
"primaryKey": false,
|
|
263
|
+
"notNull": false,
|
|
264
|
+
"autoincrement": false
|
|
265
|
+
},
|
|
266
|
+
"reasoning_durations_ms": {
|
|
267
|
+
"name": "reasoning_durations_ms",
|
|
268
|
+
"type": "text",
|
|
269
|
+
"primaryKey": false,
|
|
270
|
+
"notNull": true,
|
|
271
|
+
"autoincrement": false
|
|
272
|
+
},
|
|
273
|
+
"error": {
|
|
274
|
+
"name": "error",
|
|
275
|
+
"type": "text",
|
|
276
|
+
"primaryKey": false,
|
|
277
|
+
"notNull": false,
|
|
278
|
+
"autoincrement": false
|
|
279
|
+
},
|
|
280
|
+
"created_at": {
|
|
281
|
+
"name": "created_at",
|
|
282
|
+
"type": "text",
|
|
283
|
+
"primaryKey": false,
|
|
284
|
+
"notNull": true,
|
|
285
|
+
"autoincrement": false
|
|
286
|
+
},
|
|
287
|
+
"seq": {
|
|
288
|
+
"name": "seq",
|
|
289
|
+
"type": "integer",
|
|
290
|
+
"primaryKey": false,
|
|
291
|
+
"notNull": true,
|
|
292
|
+
"autoincrement": false,
|
|
293
|
+
"default": 0
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"indexes": {
|
|
297
|
+
"messages_chat_created_idx": {
|
|
298
|
+
"name": "messages_chat_created_idx",
|
|
299
|
+
"columns": [
|
|
300
|
+
"chat_id",
|
|
301
|
+
"created_at",
|
|
302
|
+
"seq"
|
|
303
|
+
],
|
|
304
|
+
"isUnique": false
|
|
305
|
+
},
|
|
306
|
+
"messages_seq_idx": {
|
|
307
|
+
"name": "messages_seq_idx",
|
|
308
|
+
"columns": [
|
|
309
|
+
"seq"
|
|
310
|
+
],
|
|
311
|
+
"isUnique": true
|
|
312
|
+
},
|
|
313
|
+
"messages_streaming_idx": {
|
|
314
|
+
"name": "messages_streaming_idx",
|
|
315
|
+
"columns": [
|
|
316
|
+
"status"
|
|
317
|
+
],
|
|
318
|
+
"isUnique": false,
|
|
319
|
+
"where": "\"messages\".\"status\" = 'streaming'"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"foreignKeys": {
|
|
323
|
+
"messages_chat_id_chats_id_fk": {
|
|
324
|
+
"name": "messages_chat_id_chats_id_fk",
|
|
325
|
+
"tableFrom": "messages",
|
|
326
|
+
"tableTo": "chats",
|
|
327
|
+
"columnsFrom": [
|
|
328
|
+
"chat_id"
|
|
329
|
+
],
|
|
330
|
+
"columnsTo": [
|
|
331
|
+
"id"
|
|
332
|
+
],
|
|
333
|
+
"onDelete": "cascade",
|
|
334
|
+
"onUpdate": "no action"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"compositePrimaryKeys": {},
|
|
338
|
+
"uniqueConstraints": {},
|
|
339
|
+
"checkConstraints": {}
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"views": {},
|
|
343
|
+
"enums": {},
|
|
344
|
+
"_meta": {
|
|
345
|
+
"schemas": {},
|
|
346
|
+
"tables": {},
|
|
347
|
+
"columns": {}
|
|
348
|
+
},
|
|
349
|
+
"internal": {
|
|
350
|
+
"indexes": {}
|
|
351
|
+
}
|
|
352
|
+
}
|