@okhay-p/mivra 0.1.6 → 0.1.8

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.
Files changed (47) hide show
  1. package/dist/{chunk-DYXNHODU.js → chunk-M62PZTK3.js} +117 -4
  2. package/dist/chunk-M62PZTK3.js.map +7 -0
  3. package/dist/{chunk-KE5ZEREE.js → chunk-T5WM74CI.js} +2 -1
  4. package/dist/{chunk-B47HA6IQ.js → chunk-TKDX5OCX.js} +739 -478
  5. package/dist/chunk-TKDX5OCX.js.map +7 -0
  6. package/dist/cli.js +492 -123
  7. package/dist/cli.js.map +4 -4
  8. package/dist/{client-4UG5W5NJ.js → client-76YUHG4T.js} +2 -2
  9. package/dist/exercise-child.js +1 -1
  10. package/dist/extract-child.js +2 -2
  11. package/dist/python-child.js +1 -1
  12. package/dist/{start-SX3BCBIN.js → start-GVAACONX.js} +14504 -12040
  13. package/dist/start-GVAACONX.js.map +7 -0
  14. package/drizzle/0021_strange_gamma_corps.sql +2 -0
  15. package/drizzle/0022_fast_forgotten_one.sql +28 -0
  16. package/drizzle/0023_low_wiccan.sql +17 -0
  17. package/drizzle/0024_windy_annihilus.sql +1 -0
  18. package/drizzle/0025_brief_rictor.sql +6 -0
  19. package/drizzle/0026_greedy_sally_floyd.sql +1 -0
  20. package/drizzle/0027_regular_calypso.sql +41 -0
  21. package/drizzle/0028_lazy_agent_zero.sql +17 -0
  22. package/drizzle/meta/0021_snapshot.json +2313 -0
  23. package/drizzle/meta/0022_snapshot.json +2529 -0
  24. package/drizzle/meta/0023_snapshot.json +2654 -0
  25. package/drizzle/meta/0024_snapshot.json +2662 -0
  26. package/drizzle/meta/0025_snapshot.json +2707 -0
  27. package/drizzle/meta/0026_snapshot.json +2714 -0
  28. package/drizzle/meta/0027_snapshot.json +2816 -0
  29. package/drizzle/meta/0028_snapshot.json +2940 -0
  30. package/drizzle/meta/_journal.json +56 -0
  31. package/package.json +1 -1
  32. package/web/assets/exercise-workers/{exercise.worker-DzC1lTCg.js → exercise.worker-LCHlYekD.js} +11 -11
  33. package/web/assets/exercise-workers/python-exercise.worker-DeTriNjh.js +236 -0
  34. package/web/assets/index-DowV0C_0.css +1 -0
  35. package/web/assets/index-zeJJTlMd.js +540 -0
  36. package/web/assets/{module-ES6BEMUI-Chb6aYUZ.js → module-ES6BEMUI-B2wjplZC.js} +1 -1
  37. package/web/assets/render.worker-OksjuBjV.js +537 -0
  38. package/web/index.html +2 -2
  39. package/dist/chunk-B47HA6IQ.js.map +0 -7
  40. package/dist/chunk-DYXNHODU.js.map +0 -7
  41. package/dist/start-SX3BCBIN.js.map +0 -7
  42. package/web/assets/exercise-workers/python-exercise.worker-CtSr-syJ.js +0 -236
  43. package/web/assets/index-D3M-SX0V.js +0 -538
  44. package/web/assets/index-DUFQVtIh.css +0 -1
  45. package/web/assets/render.worker-D6KYAHiU.js +0 -537
  46. /package/dist/{chunk-KE5ZEREE.js.map → chunk-T5WM74CI.js.map} +0 -0
  47. /package/dist/{client-4UG5W5NJ.js.map → client-76YUHG4T.js.map} +0 -0
@@ -0,0 +1,2940 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "803f3e90-e0d5-4e77-8ff8-05ac05e3ebc8",
5
+ "prevId": "a7294710-0992-4c18-9cb2-41679b19a005",
6
+ "tables": {
7
+ "artifacts": {
8
+ "name": "artifacts",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "session_id": {
18
+ "name": "session_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "run_id": {
25
+ "name": "run_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "tool_call_id": {
32
+ "name": "tool_call_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "kind": {
39
+ "name": "kind",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "version": {
46
+ "name": "version",
47
+ "type": "integer",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "spec": {
53
+ "name": "spec",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "created_at": {
60
+ "name": "created_at",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ }
66
+ },
67
+ "indexes": {
68
+ "artifacts_session_idx": {
69
+ "name": "artifacts_session_idx",
70
+ "columns": [
71
+ "session_id",
72
+ "created_at"
73
+ ],
74
+ "isUnique": false
75
+ },
76
+ "artifacts_tool_call_idx": {
77
+ "name": "artifacts_tool_call_idx",
78
+ "columns": [
79
+ "run_id",
80
+ "tool_call_id"
81
+ ],
82
+ "isUnique": true
83
+ }
84
+ },
85
+ "foreignKeys": {
86
+ "artifacts_session_id_sessions_id_fk": {
87
+ "name": "artifacts_session_id_sessions_id_fk",
88
+ "tableFrom": "artifacts",
89
+ "tableTo": "sessions",
90
+ "columnsFrom": [
91
+ "session_id"
92
+ ],
93
+ "columnsTo": [
94
+ "id"
95
+ ],
96
+ "onDelete": "cascade",
97
+ "onUpdate": "no action"
98
+ },
99
+ "artifacts_run_id_runs_id_fk": {
100
+ "name": "artifacts_run_id_runs_id_fk",
101
+ "tableFrom": "artifacts",
102
+ "tableTo": "runs",
103
+ "columnsFrom": [
104
+ "run_id"
105
+ ],
106
+ "columnsTo": [
107
+ "id"
108
+ ],
109
+ "onDelete": "cascade",
110
+ "onUpdate": "no action"
111
+ }
112
+ },
113
+ "compositePrimaryKeys": {},
114
+ "uniqueConstraints": {},
115
+ "checkConstraints": {}
116
+ },
117
+ "attempts": {
118
+ "name": "attempts",
119
+ "columns": {
120
+ "id": {
121
+ "name": "id",
122
+ "type": "text",
123
+ "primaryKey": true,
124
+ "notNull": true,
125
+ "autoincrement": false
126
+ },
127
+ "artifact_id": {
128
+ "name": "artifact_id",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true,
132
+ "autoincrement": false
133
+ },
134
+ "session_id": {
135
+ "name": "session_id",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true,
139
+ "autoincrement": false
140
+ },
141
+ "answer": {
142
+ "name": "answer",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": true,
146
+ "autoincrement": false
147
+ },
148
+ "grade": {
149
+ "name": "grade",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": true,
153
+ "autoincrement": false
154
+ },
155
+ "correct": {
156
+ "name": "correct",
157
+ "type": "integer",
158
+ "primaryKey": false,
159
+ "notNull": true,
160
+ "autoincrement": false
161
+ },
162
+ "concept": {
163
+ "name": "concept",
164
+ "type": "text",
165
+ "primaryKey": false,
166
+ "notNull": false,
167
+ "autoincrement": false
168
+ },
169
+ "judge": {
170
+ "name": "judge",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "autoincrement": false,
175
+ "default": "'grader'"
176
+ },
177
+ "created_at": {
178
+ "name": "created_at",
179
+ "type": "integer",
180
+ "primaryKey": false,
181
+ "notNull": true,
182
+ "autoincrement": false
183
+ }
184
+ },
185
+ "indexes": {
186
+ "attempts_one_per_artifact_idx": {
187
+ "name": "attempts_one_per_artifact_idx",
188
+ "columns": [
189
+ "artifact_id",
190
+ "judge"
191
+ ],
192
+ "isUnique": true
193
+ },
194
+ "attempts_session_idx": {
195
+ "name": "attempts_session_idx",
196
+ "columns": [
197
+ "session_id",
198
+ "created_at"
199
+ ],
200
+ "isUnique": false
201
+ },
202
+ "attempts_created_idx": {
203
+ "name": "attempts_created_idx",
204
+ "columns": [
205
+ "created_at"
206
+ ],
207
+ "isUnique": false
208
+ }
209
+ },
210
+ "foreignKeys": {
211
+ "attempts_artifact_id_artifacts_id_fk": {
212
+ "name": "attempts_artifact_id_artifacts_id_fk",
213
+ "tableFrom": "attempts",
214
+ "tableTo": "artifacts",
215
+ "columnsFrom": [
216
+ "artifact_id"
217
+ ],
218
+ "columnsTo": [
219
+ "id"
220
+ ],
221
+ "onDelete": "cascade",
222
+ "onUpdate": "no action"
223
+ },
224
+ "attempts_session_id_sessions_id_fk": {
225
+ "name": "attempts_session_id_sessions_id_fk",
226
+ "tableFrom": "attempts",
227
+ "tableTo": "sessions",
228
+ "columnsFrom": [
229
+ "session_id"
230
+ ],
231
+ "columnsTo": [
232
+ "id"
233
+ ],
234
+ "onDelete": "cascade",
235
+ "onUpdate": "no action"
236
+ }
237
+ },
238
+ "compositePrimaryKeys": {},
239
+ "uniqueConstraints": {},
240
+ "checkConstraints": {}
241
+ },
242
+ "concept_edges": {
243
+ "name": "concept_edges",
244
+ "columns": {
245
+ "from_id": {
246
+ "name": "from_id",
247
+ "type": "text",
248
+ "primaryKey": false,
249
+ "notNull": true,
250
+ "autoincrement": false
251
+ },
252
+ "to_id": {
253
+ "name": "to_id",
254
+ "type": "text",
255
+ "primaryKey": false,
256
+ "notNull": true,
257
+ "autoincrement": false
258
+ },
259
+ "kind": {
260
+ "name": "kind",
261
+ "type": "text",
262
+ "primaryKey": false,
263
+ "notNull": true,
264
+ "autoincrement": false
265
+ },
266
+ "note_id": {
267
+ "name": "note_id",
268
+ "type": "text",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "autoincrement": false
272
+ }
273
+ },
274
+ "indexes": {
275
+ "concept_edges_note_idx": {
276
+ "name": "concept_edges_note_idx",
277
+ "columns": [
278
+ "note_id"
279
+ ],
280
+ "isUnique": false
281
+ },
282
+ "concept_edges_to_idx": {
283
+ "name": "concept_edges_to_idx",
284
+ "columns": [
285
+ "to_id"
286
+ ],
287
+ "isUnique": false
288
+ }
289
+ },
290
+ "foreignKeys": {
291
+ "concept_edges_from_id_concepts_id_fk": {
292
+ "name": "concept_edges_from_id_concepts_id_fk",
293
+ "tableFrom": "concept_edges",
294
+ "tableTo": "concepts",
295
+ "columnsFrom": [
296
+ "from_id"
297
+ ],
298
+ "columnsTo": [
299
+ "id"
300
+ ],
301
+ "onDelete": "cascade",
302
+ "onUpdate": "no action"
303
+ },
304
+ "concept_edges_to_id_concepts_id_fk": {
305
+ "name": "concept_edges_to_id_concepts_id_fk",
306
+ "tableFrom": "concept_edges",
307
+ "tableTo": "concepts",
308
+ "columnsFrom": [
309
+ "to_id"
310
+ ],
311
+ "columnsTo": [
312
+ "id"
313
+ ],
314
+ "onDelete": "cascade",
315
+ "onUpdate": "no action"
316
+ },
317
+ "concept_edges_note_id_notes_id_fk": {
318
+ "name": "concept_edges_note_id_notes_id_fk",
319
+ "tableFrom": "concept_edges",
320
+ "tableTo": "notes",
321
+ "columnsFrom": [
322
+ "note_id"
323
+ ],
324
+ "columnsTo": [
325
+ "id"
326
+ ],
327
+ "onDelete": "cascade",
328
+ "onUpdate": "no action"
329
+ }
330
+ },
331
+ "compositePrimaryKeys": {
332
+ "concept_edges_from_id_to_id_kind_note_id_pk": {
333
+ "columns": [
334
+ "from_id",
335
+ "to_id",
336
+ "kind",
337
+ "note_id"
338
+ ],
339
+ "name": "concept_edges_from_id_to_id_kind_note_id_pk"
340
+ }
341
+ },
342
+ "uniqueConstraints": {},
343
+ "checkConstraints": {}
344
+ },
345
+ "concept_session_edges": {
346
+ "name": "concept_session_edges",
347
+ "columns": {
348
+ "id": {
349
+ "name": "id",
350
+ "type": "text",
351
+ "primaryKey": true,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "from_id": {
356
+ "name": "from_id",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "to_id": {
363
+ "name": "to_id",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": true,
367
+ "autoincrement": false
368
+ },
369
+ "kind": {
370
+ "name": "kind",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": true,
374
+ "autoincrement": false
375
+ },
376
+ "session_id": {
377
+ "name": "session_id",
378
+ "type": "text",
379
+ "primaryKey": false,
380
+ "notNull": false,
381
+ "autoincrement": false
382
+ },
383
+ "run_id": {
384
+ "name": "run_id",
385
+ "type": "text",
386
+ "primaryKey": false,
387
+ "notNull": false,
388
+ "autoincrement": false
389
+ },
390
+ "status": {
391
+ "name": "status",
392
+ "type": "text",
393
+ "primaryKey": false,
394
+ "notNull": true,
395
+ "autoincrement": false,
396
+ "default": "'active'"
397
+ },
398
+ "created_at": {
399
+ "name": "created_at",
400
+ "type": "integer",
401
+ "primaryKey": false,
402
+ "notNull": true,
403
+ "autoincrement": false
404
+ }
405
+ },
406
+ "indexes": {
407
+ "concept_session_edges_edge_session_idx": {
408
+ "name": "concept_session_edges_edge_session_idx",
409
+ "columns": [
410
+ "from_id",
411
+ "to_id",
412
+ "kind",
413
+ "session_id"
414
+ ],
415
+ "isUnique": true,
416
+ "where": "\"concept_session_edges\".\"session_id\" is not null"
417
+ },
418
+ "concept_session_edges_from_to_idx": {
419
+ "name": "concept_session_edges_from_to_idx",
420
+ "columns": [
421
+ "from_id",
422
+ "to_id",
423
+ "kind"
424
+ ],
425
+ "isUnique": false
426
+ },
427
+ "concept_session_edges_to_idx": {
428
+ "name": "concept_session_edges_to_idx",
429
+ "columns": [
430
+ "to_id"
431
+ ],
432
+ "isUnique": false
433
+ },
434
+ "concept_session_edges_session_idx": {
435
+ "name": "concept_session_edges_session_idx",
436
+ "columns": [
437
+ "session_id"
438
+ ],
439
+ "isUnique": false
440
+ },
441
+ "concept_session_edges_run_idx": {
442
+ "name": "concept_session_edges_run_idx",
443
+ "columns": [
444
+ "run_id"
445
+ ],
446
+ "isUnique": false
447
+ }
448
+ },
449
+ "foreignKeys": {
450
+ "concept_session_edges_from_id_concepts_id_fk": {
451
+ "name": "concept_session_edges_from_id_concepts_id_fk",
452
+ "tableFrom": "concept_session_edges",
453
+ "tableTo": "concepts",
454
+ "columnsFrom": [
455
+ "from_id"
456
+ ],
457
+ "columnsTo": [
458
+ "id"
459
+ ],
460
+ "onDelete": "cascade",
461
+ "onUpdate": "no action"
462
+ },
463
+ "concept_session_edges_to_id_concepts_id_fk": {
464
+ "name": "concept_session_edges_to_id_concepts_id_fk",
465
+ "tableFrom": "concept_session_edges",
466
+ "tableTo": "concepts",
467
+ "columnsFrom": [
468
+ "to_id"
469
+ ],
470
+ "columnsTo": [
471
+ "id"
472
+ ],
473
+ "onDelete": "cascade",
474
+ "onUpdate": "no action"
475
+ },
476
+ "concept_session_edges_session_id_sessions_id_fk": {
477
+ "name": "concept_session_edges_session_id_sessions_id_fk",
478
+ "tableFrom": "concept_session_edges",
479
+ "tableTo": "sessions",
480
+ "columnsFrom": [
481
+ "session_id"
482
+ ],
483
+ "columnsTo": [
484
+ "id"
485
+ ],
486
+ "onDelete": "set null",
487
+ "onUpdate": "no action"
488
+ },
489
+ "concept_session_edges_run_id_runs_id_fk": {
490
+ "name": "concept_session_edges_run_id_runs_id_fk",
491
+ "tableFrom": "concept_session_edges",
492
+ "tableTo": "runs",
493
+ "columnsFrom": [
494
+ "run_id"
495
+ ],
496
+ "columnsTo": [
497
+ "id"
498
+ ],
499
+ "onDelete": "set null",
500
+ "onUpdate": "no action"
501
+ }
502
+ },
503
+ "compositePrimaryKeys": {},
504
+ "uniqueConstraints": {},
505
+ "checkConstraints": {}
506
+ },
507
+ "concept_session_sources": {
508
+ "name": "concept_session_sources",
509
+ "columns": {
510
+ "id": {
511
+ "name": "id",
512
+ "type": "text",
513
+ "primaryKey": true,
514
+ "notNull": true,
515
+ "autoincrement": false
516
+ },
517
+ "concept_id": {
518
+ "name": "concept_id",
519
+ "type": "text",
520
+ "primaryKey": false,
521
+ "notNull": true,
522
+ "autoincrement": false
523
+ },
524
+ "session_id": {
525
+ "name": "session_id",
526
+ "type": "text",
527
+ "primaryKey": false,
528
+ "notNull": false,
529
+ "autoincrement": false
530
+ },
531
+ "run_id": {
532
+ "name": "run_id",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": false,
536
+ "autoincrement": false
537
+ },
538
+ "status": {
539
+ "name": "status",
540
+ "type": "text",
541
+ "primaryKey": false,
542
+ "notNull": true,
543
+ "autoincrement": false,
544
+ "default": "'active'"
545
+ },
546
+ "created_at": {
547
+ "name": "created_at",
548
+ "type": "integer",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "autoincrement": false
552
+ }
553
+ },
554
+ "indexes": {
555
+ "concept_session_sources_concept_session_idx": {
556
+ "name": "concept_session_sources_concept_session_idx",
557
+ "columns": [
558
+ "concept_id",
559
+ "session_id"
560
+ ],
561
+ "isUnique": true,
562
+ "where": "\"concept_session_sources\".\"session_id\" is not null"
563
+ },
564
+ "concept_session_sources_concept_idx": {
565
+ "name": "concept_session_sources_concept_idx",
566
+ "columns": [
567
+ "concept_id"
568
+ ],
569
+ "isUnique": false
570
+ },
571
+ "concept_session_sources_session_idx": {
572
+ "name": "concept_session_sources_session_idx",
573
+ "columns": [
574
+ "session_id"
575
+ ],
576
+ "isUnique": false
577
+ },
578
+ "concept_session_sources_run_idx": {
579
+ "name": "concept_session_sources_run_idx",
580
+ "columns": [
581
+ "run_id"
582
+ ],
583
+ "isUnique": false
584
+ }
585
+ },
586
+ "foreignKeys": {
587
+ "concept_session_sources_concept_id_concepts_id_fk": {
588
+ "name": "concept_session_sources_concept_id_concepts_id_fk",
589
+ "tableFrom": "concept_session_sources",
590
+ "tableTo": "concepts",
591
+ "columnsFrom": [
592
+ "concept_id"
593
+ ],
594
+ "columnsTo": [
595
+ "id"
596
+ ],
597
+ "onDelete": "cascade",
598
+ "onUpdate": "no action"
599
+ },
600
+ "concept_session_sources_session_id_sessions_id_fk": {
601
+ "name": "concept_session_sources_session_id_sessions_id_fk",
602
+ "tableFrom": "concept_session_sources",
603
+ "tableTo": "sessions",
604
+ "columnsFrom": [
605
+ "session_id"
606
+ ],
607
+ "columnsTo": [
608
+ "id"
609
+ ],
610
+ "onDelete": "set null",
611
+ "onUpdate": "no action"
612
+ },
613
+ "concept_session_sources_run_id_runs_id_fk": {
614
+ "name": "concept_session_sources_run_id_runs_id_fk",
615
+ "tableFrom": "concept_session_sources",
616
+ "tableTo": "runs",
617
+ "columnsFrom": [
618
+ "run_id"
619
+ ],
620
+ "columnsTo": [
621
+ "id"
622
+ ],
623
+ "onDelete": "set null",
624
+ "onUpdate": "no action"
625
+ }
626
+ },
627
+ "compositePrimaryKeys": {},
628
+ "uniqueConstraints": {},
629
+ "checkConstraints": {}
630
+ },
631
+ "concept_sources": {
632
+ "name": "concept_sources",
633
+ "columns": {
634
+ "concept_id": {
635
+ "name": "concept_id",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": true,
639
+ "autoincrement": false
640
+ },
641
+ "note_id": {
642
+ "name": "note_id",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": true,
646
+ "autoincrement": false
647
+ }
648
+ },
649
+ "indexes": {
650
+ "concept_sources_note_idx": {
651
+ "name": "concept_sources_note_idx",
652
+ "columns": [
653
+ "note_id"
654
+ ],
655
+ "isUnique": false
656
+ }
657
+ },
658
+ "foreignKeys": {
659
+ "concept_sources_concept_id_concepts_id_fk": {
660
+ "name": "concept_sources_concept_id_concepts_id_fk",
661
+ "tableFrom": "concept_sources",
662
+ "tableTo": "concepts",
663
+ "columnsFrom": [
664
+ "concept_id"
665
+ ],
666
+ "columnsTo": [
667
+ "id"
668
+ ],
669
+ "onDelete": "cascade",
670
+ "onUpdate": "no action"
671
+ },
672
+ "concept_sources_note_id_notes_id_fk": {
673
+ "name": "concept_sources_note_id_notes_id_fk",
674
+ "tableFrom": "concept_sources",
675
+ "tableTo": "notes",
676
+ "columnsFrom": [
677
+ "note_id"
678
+ ],
679
+ "columnsTo": [
680
+ "id"
681
+ ],
682
+ "onDelete": "cascade",
683
+ "onUpdate": "no action"
684
+ }
685
+ },
686
+ "compositePrimaryKeys": {
687
+ "concept_sources_concept_id_note_id_pk": {
688
+ "columns": [
689
+ "concept_id",
690
+ "note_id"
691
+ ],
692
+ "name": "concept_sources_concept_id_note_id_pk"
693
+ }
694
+ },
695
+ "uniqueConstraints": {},
696
+ "checkConstraints": {}
697
+ },
698
+ "concepts": {
699
+ "name": "concepts",
700
+ "columns": {
701
+ "id": {
702
+ "name": "id",
703
+ "type": "text",
704
+ "primaryKey": true,
705
+ "notNull": true,
706
+ "autoincrement": false
707
+ },
708
+ "key": {
709
+ "name": "key",
710
+ "type": "text",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "autoincrement": false
714
+ },
715
+ "name": {
716
+ "name": "name",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": true,
720
+ "autoincrement": false
721
+ },
722
+ "created_at": {
723
+ "name": "created_at",
724
+ "type": "integer",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "autoincrement": false
728
+ }
729
+ },
730
+ "indexes": {
731
+ "concepts_key_idx": {
732
+ "name": "concepts_key_idx",
733
+ "columns": [
734
+ "key"
735
+ ],
736
+ "isUnique": true
737
+ }
738
+ },
739
+ "foreignKeys": {},
740
+ "compositePrimaryKeys": {},
741
+ "uniqueConstraints": {},
742
+ "checkConstraints": {}
743
+ },
744
+ "courses": {
745
+ "name": "courses",
746
+ "columns": {
747
+ "id": {
748
+ "name": "id",
749
+ "type": "text",
750
+ "primaryKey": true,
751
+ "notNull": true,
752
+ "autoincrement": false
753
+ },
754
+ "session_id": {
755
+ "name": "session_id",
756
+ "type": "text",
757
+ "primaryKey": false,
758
+ "notNull": true,
759
+ "autoincrement": false
760
+ },
761
+ "goal": {
762
+ "name": "goal",
763
+ "type": "text",
764
+ "primaryKey": false,
765
+ "notNull": true,
766
+ "autoincrement": false
767
+ },
768
+ "kind": {
769
+ "name": "kind",
770
+ "type": "text",
771
+ "primaryKey": false,
772
+ "notNull": true,
773
+ "autoincrement": false,
774
+ "default": "'lessons'"
775
+ },
776
+ "placement_depth": {
777
+ "name": "placement_depth",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "autoincrement": false,
782
+ "default": "'quick'"
783
+ },
784
+ "status": {
785
+ "name": "status",
786
+ "type": "text",
787
+ "primaryKey": false,
788
+ "notNull": true,
789
+ "autoincrement": false
790
+ },
791
+ "icon": {
792
+ "name": "icon",
793
+ "type": "text",
794
+ "primaryKey": false,
795
+ "notNull": false,
796
+ "autoincrement": false
797
+ },
798
+ "created_at": {
799
+ "name": "created_at",
800
+ "type": "integer",
801
+ "primaryKey": false,
802
+ "notNull": true,
803
+ "autoincrement": false
804
+ },
805
+ "updated_at": {
806
+ "name": "updated_at",
807
+ "type": "integer",
808
+ "primaryKey": false,
809
+ "notNull": true,
810
+ "autoincrement": false
811
+ }
812
+ },
813
+ "indexes": {
814
+ "courses_session_idx": {
815
+ "name": "courses_session_idx",
816
+ "columns": [
817
+ "session_id"
818
+ ],
819
+ "isUnique": true
820
+ }
821
+ },
822
+ "foreignKeys": {
823
+ "courses_session_id_sessions_id_fk": {
824
+ "name": "courses_session_id_sessions_id_fk",
825
+ "tableFrom": "courses",
826
+ "tableTo": "sessions",
827
+ "columnsFrom": [
828
+ "session_id"
829
+ ],
830
+ "columnsTo": [
831
+ "id"
832
+ ],
833
+ "onDelete": "cascade",
834
+ "onUpdate": "no action"
835
+ }
836
+ },
837
+ "compositePrimaryKeys": {},
838
+ "uniqueConstraints": {},
839
+ "checkConstraints": {}
840
+ },
841
+ "document_chunks": {
842
+ "name": "document_chunks",
843
+ "columns": {
844
+ "id": {
845
+ "name": "id",
846
+ "type": "integer",
847
+ "primaryKey": true,
848
+ "notNull": true,
849
+ "autoincrement": true
850
+ },
851
+ "document_id": {
852
+ "name": "document_id",
853
+ "type": "text",
854
+ "primaryKey": false,
855
+ "notNull": true,
856
+ "autoincrement": false
857
+ },
858
+ "page": {
859
+ "name": "page",
860
+ "type": "integer",
861
+ "primaryKey": false,
862
+ "notNull": true,
863
+ "autoincrement": false
864
+ },
865
+ "seq": {
866
+ "name": "seq",
867
+ "type": "integer",
868
+ "primaryKey": false,
869
+ "notNull": true,
870
+ "autoincrement": false
871
+ },
872
+ "text": {
873
+ "name": "text",
874
+ "type": "text",
875
+ "primaryKey": false,
876
+ "notNull": true,
877
+ "autoincrement": false
878
+ }
879
+ },
880
+ "indexes": {
881
+ "document_chunks_document_seq_idx": {
882
+ "name": "document_chunks_document_seq_idx",
883
+ "columns": [
884
+ "document_id",
885
+ "seq"
886
+ ],
887
+ "isUnique": true
888
+ }
889
+ },
890
+ "foreignKeys": {
891
+ "document_chunks_document_id_documents_id_fk": {
892
+ "name": "document_chunks_document_id_documents_id_fk",
893
+ "tableFrom": "document_chunks",
894
+ "tableTo": "documents",
895
+ "columnsFrom": [
896
+ "document_id"
897
+ ],
898
+ "columnsTo": [
899
+ "id"
900
+ ],
901
+ "onDelete": "cascade",
902
+ "onUpdate": "no action"
903
+ }
904
+ },
905
+ "compositePrimaryKeys": {},
906
+ "uniqueConstraints": {},
907
+ "checkConstraints": {}
908
+ },
909
+ "documents": {
910
+ "name": "documents",
911
+ "columns": {
912
+ "id": {
913
+ "name": "id",
914
+ "type": "text",
915
+ "primaryKey": true,
916
+ "notNull": true,
917
+ "autoincrement": false
918
+ },
919
+ "session_id": {
920
+ "name": "session_id",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": false,
924
+ "autoincrement": false
925
+ },
926
+ "message_id": {
927
+ "name": "message_id",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": false,
931
+ "autoincrement": false
932
+ },
933
+ "filename": {
934
+ "name": "filename",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": true,
938
+ "autoincrement": false
939
+ },
940
+ "kind": {
941
+ "name": "kind",
942
+ "type": "text",
943
+ "primaryKey": false,
944
+ "notNull": true,
945
+ "autoincrement": false
946
+ },
947
+ "byte_size": {
948
+ "name": "byte_size",
949
+ "type": "integer",
950
+ "primaryKey": false,
951
+ "notNull": true,
952
+ "autoincrement": false
953
+ },
954
+ "text_chars": {
955
+ "name": "text_chars",
956
+ "type": "integer",
957
+ "primaryKey": false,
958
+ "notNull": true,
959
+ "autoincrement": false
960
+ },
961
+ "page_count": {
962
+ "name": "page_count",
963
+ "type": "integer",
964
+ "primaryKey": false,
965
+ "notNull": true,
966
+ "autoincrement": false
967
+ },
968
+ "pages_with_text": {
969
+ "name": "pages_with_text",
970
+ "type": "integer",
971
+ "primaryKey": false,
972
+ "notNull": true,
973
+ "autoincrement": false
974
+ },
975
+ "status": {
976
+ "name": "status",
977
+ "type": "text",
978
+ "primaryKey": false,
979
+ "notNull": true,
980
+ "autoincrement": false
981
+ },
982
+ "created_at": {
983
+ "name": "created_at",
984
+ "type": "integer",
985
+ "primaryKey": false,
986
+ "notNull": true,
987
+ "autoincrement": false
988
+ }
989
+ },
990
+ "indexes": {
991
+ "documents_session_idx": {
992
+ "name": "documents_session_idx",
993
+ "columns": [
994
+ "session_id",
995
+ "created_at"
996
+ ],
997
+ "isUnique": false
998
+ }
999
+ },
1000
+ "foreignKeys": {
1001
+ "documents_session_id_sessions_id_fk": {
1002
+ "name": "documents_session_id_sessions_id_fk",
1003
+ "tableFrom": "documents",
1004
+ "tableTo": "sessions",
1005
+ "columnsFrom": [
1006
+ "session_id"
1007
+ ],
1008
+ "columnsTo": [
1009
+ "id"
1010
+ ],
1011
+ "onDelete": "set null",
1012
+ "onUpdate": "no action"
1013
+ },
1014
+ "documents_message_id_messages_id_fk": {
1015
+ "name": "documents_message_id_messages_id_fk",
1016
+ "tableFrom": "documents",
1017
+ "tableTo": "messages",
1018
+ "columnsFrom": [
1019
+ "message_id"
1020
+ ],
1021
+ "columnsTo": [
1022
+ "id"
1023
+ ],
1024
+ "onDelete": "set null",
1025
+ "onUpdate": "no action"
1026
+ }
1027
+ },
1028
+ "compositePrimaryKeys": {},
1029
+ "uniqueConstraints": {},
1030
+ "checkConstraints": {}
1031
+ },
1032
+ "flashcard_reviews": {
1033
+ "name": "flashcard_reviews",
1034
+ "columns": {
1035
+ "id": {
1036
+ "name": "id",
1037
+ "type": "text",
1038
+ "primaryKey": true,
1039
+ "notNull": true,
1040
+ "autoincrement": false
1041
+ },
1042
+ "artifact_id": {
1043
+ "name": "artifact_id",
1044
+ "type": "text",
1045
+ "primaryKey": false,
1046
+ "notNull": true,
1047
+ "autoincrement": false
1048
+ },
1049
+ "session_id": {
1050
+ "name": "session_id",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true,
1054
+ "autoincrement": false
1055
+ },
1056
+ "card_id": {
1057
+ "name": "card_id",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "autoincrement": false
1062
+ },
1063
+ "rating": {
1064
+ "name": "rating",
1065
+ "type": "text",
1066
+ "primaryKey": false,
1067
+ "notNull": true,
1068
+ "autoincrement": false
1069
+ },
1070
+ "repetitions": {
1071
+ "name": "repetitions",
1072
+ "type": "integer",
1073
+ "primaryKey": false,
1074
+ "notNull": true,
1075
+ "autoincrement": false
1076
+ },
1077
+ "interval_days": {
1078
+ "name": "interval_days",
1079
+ "type": "integer",
1080
+ "primaryKey": false,
1081
+ "notNull": true,
1082
+ "autoincrement": false
1083
+ },
1084
+ "ease": {
1085
+ "name": "ease",
1086
+ "type": "real",
1087
+ "primaryKey": false,
1088
+ "notNull": true,
1089
+ "autoincrement": false
1090
+ },
1091
+ "due_at": {
1092
+ "name": "due_at",
1093
+ "type": "integer",
1094
+ "primaryKey": false,
1095
+ "notNull": true,
1096
+ "autoincrement": false
1097
+ },
1098
+ "created_at": {
1099
+ "name": "created_at",
1100
+ "type": "integer",
1101
+ "primaryKey": false,
1102
+ "notNull": true,
1103
+ "autoincrement": false
1104
+ }
1105
+ },
1106
+ "indexes": {
1107
+ "flashcard_reviews_card_idx": {
1108
+ "name": "flashcard_reviews_card_idx",
1109
+ "columns": [
1110
+ "artifact_id",
1111
+ "card_id",
1112
+ "created_at"
1113
+ ],
1114
+ "isUnique": false
1115
+ },
1116
+ "flashcard_reviews_session_idx": {
1117
+ "name": "flashcard_reviews_session_idx",
1118
+ "columns": [
1119
+ "session_id"
1120
+ ],
1121
+ "isUnique": false
1122
+ }
1123
+ },
1124
+ "foreignKeys": {
1125
+ "flashcard_reviews_artifact_id_artifacts_id_fk": {
1126
+ "name": "flashcard_reviews_artifact_id_artifacts_id_fk",
1127
+ "tableFrom": "flashcard_reviews",
1128
+ "tableTo": "artifacts",
1129
+ "columnsFrom": [
1130
+ "artifact_id"
1131
+ ],
1132
+ "columnsTo": [
1133
+ "id"
1134
+ ],
1135
+ "onDelete": "cascade",
1136
+ "onUpdate": "no action"
1137
+ },
1138
+ "flashcard_reviews_session_id_sessions_id_fk": {
1139
+ "name": "flashcard_reviews_session_id_sessions_id_fk",
1140
+ "tableFrom": "flashcard_reviews",
1141
+ "tableTo": "sessions",
1142
+ "columnsFrom": [
1143
+ "session_id"
1144
+ ],
1145
+ "columnsTo": [
1146
+ "id"
1147
+ ],
1148
+ "onDelete": "cascade",
1149
+ "onUpdate": "no action"
1150
+ }
1151
+ },
1152
+ "compositePrimaryKeys": {},
1153
+ "uniqueConstraints": {},
1154
+ "checkConstraints": {}
1155
+ },
1156
+ "lesson_sections": {
1157
+ "name": "lesson_sections",
1158
+ "columns": {
1159
+ "id": {
1160
+ "name": "id",
1161
+ "type": "text",
1162
+ "primaryKey": true,
1163
+ "notNull": true,
1164
+ "autoincrement": false
1165
+ },
1166
+ "lesson_id": {
1167
+ "name": "lesson_id",
1168
+ "type": "text",
1169
+ "primaryKey": false,
1170
+ "notNull": true,
1171
+ "autoincrement": false
1172
+ },
1173
+ "kind": {
1174
+ "name": "kind",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": true,
1178
+ "autoincrement": false
1179
+ },
1180
+ "title": {
1181
+ "name": "title",
1182
+ "type": "text",
1183
+ "primaryKey": false,
1184
+ "notNull": true,
1185
+ "autoincrement": false
1186
+ },
1187
+ "markdown": {
1188
+ "name": "markdown",
1189
+ "type": "text",
1190
+ "primaryKey": false,
1191
+ "notNull": false,
1192
+ "autoincrement": false
1193
+ },
1194
+ "artifact_id": {
1195
+ "name": "artifact_id",
1196
+ "type": "text",
1197
+ "primaryKey": false,
1198
+ "notNull": false,
1199
+ "autoincrement": false
1200
+ },
1201
+ "revisits": {
1202
+ "name": "revisits",
1203
+ "type": "text",
1204
+ "primaryKey": false,
1205
+ "notNull": true,
1206
+ "autoincrement": false,
1207
+ "default": "'[]'"
1208
+ },
1209
+ "created_at": {
1210
+ "name": "created_at",
1211
+ "type": "integer",
1212
+ "primaryKey": false,
1213
+ "notNull": true,
1214
+ "autoincrement": false
1215
+ }
1216
+ },
1217
+ "indexes": {
1218
+ "lesson_sections_lesson_idx": {
1219
+ "name": "lesson_sections_lesson_idx",
1220
+ "columns": [
1221
+ "lesson_id"
1222
+ ],
1223
+ "isUnique": false
1224
+ },
1225
+ "lesson_sections_artifact_idx": {
1226
+ "name": "lesson_sections_artifact_idx",
1227
+ "columns": [
1228
+ "artifact_id"
1229
+ ],
1230
+ "isUnique": true
1231
+ }
1232
+ },
1233
+ "foreignKeys": {
1234
+ "lesson_sections_lesson_id_lessons_id_fk": {
1235
+ "name": "lesson_sections_lesson_id_lessons_id_fk",
1236
+ "tableFrom": "lesson_sections",
1237
+ "tableTo": "lessons",
1238
+ "columnsFrom": [
1239
+ "lesson_id"
1240
+ ],
1241
+ "columnsTo": [
1242
+ "id"
1243
+ ],
1244
+ "onDelete": "cascade",
1245
+ "onUpdate": "no action"
1246
+ },
1247
+ "lesson_sections_artifact_id_artifacts_id_fk": {
1248
+ "name": "lesson_sections_artifact_id_artifacts_id_fk",
1249
+ "tableFrom": "lesson_sections",
1250
+ "tableTo": "artifacts",
1251
+ "columnsFrom": [
1252
+ "artifact_id"
1253
+ ],
1254
+ "columnsTo": [
1255
+ "id"
1256
+ ],
1257
+ "onDelete": "cascade",
1258
+ "onUpdate": "no action"
1259
+ }
1260
+ },
1261
+ "compositePrimaryKeys": {},
1262
+ "uniqueConstraints": {},
1263
+ "checkConstraints": {}
1264
+ },
1265
+ "lesson_versions": {
1266
+ "name": "lesson_versions",
1267
+ "columns": {
1268
+ "id": {
1269
+ "name": "id",
1270
+ "type": "text",
1271
+ "primaryKey": true,
1272
+ "notNull": true,
1273
+ "autoincrement": false
1274
+ },
1275
+ "lesson_id": {
1276
+ "name": "lesson_id",
1277
+ "type": "text",
1278
+ "primaryKey": false,
1279
+ "notNull": true,
1280
+ "autoincrement": false
1281
+ },
1282
+ "version": {
1283
+ "name": "version",
1284
+ "type": "integer",
1285
+ "primaryKey": false,
1286
+ "notNull": true,
1287
+ "autoincrement": false
1288
+ },
1289
+ "outline": {
1290
+ "name": "outline",
1291
+ "type": "text",
1292
+ "primaryKey": false,
1293
+ "notNull": true,
1294
+ "autoincrement": false
1295
+ },
1296
+ "section_ids": {
1297
+ "name": "section_ids",
1298
+ "type": "text",
1299
+ "primaryKey": false,
1300
+ "notNull": true,
1301
+ "autoincrement": false
1302
+ },
1303
+ "changed_section_ids": {
1304
+ "name": "changed_section_ids",
1305
+ "type": "text",
1306
+ "primaryKey": false,
1307
+ "notNull": true,
1308
+ "autoincrement": false,
1309
+ "default": "'[]'"
1310
+ },
1311
+ "reason": {
1312
+ "name": "reason",
1313
+ "type": "text",
1314
+ "primaryKey": false,
1315
+ "notNull": false,
1316
+ "autoincrement": false
1317
+ },
1318
+ "created_at": {
1319
+ "name": "created_at",
1320
+ "type": "integer",
1321
+ "primaryKey": false,
1322
+ "notNull": true,
1323
+ "autoincrement": false
1324
+ }
1325
+ },
1326
+ "indexes": {
1327
+ "lesson_versions_lesson_version_idx": {
1328
+ "name": "lesson_versions_lesson_version_idx",
1329
+ "columns": [
1330
+ "lesson_id",
1331
+ "version"
1332
+ ],
1333
+ "isUnique": true
1334
+ }
1335
+ },
1336
+ "foreignKeys": {
1337
+ "lesson_versions_lesson_id_lessons_id_fk": {
1338
+ "name": "lesson_versions_lesson_id_lessons_id_fk",
1339
+ "tableFrom": "lesson_versions",
1340
+ "tableTo": "lessons",
1341
+ "columnsFrom": [
1342
+ "lesson_id"
1343
+ ],
1344
+ "columnsTo": [
1345
+ "id"
1346
+ ],
1347
+ "onDelete": "cascade",
1348
+ "onUpdate": "no action"
1349
+ }
1350
+ },
1351
+ "compositePrimaryKeys": {},
1352
+ "uniqueConstraints": {},
1353
+ "checkConstraints": {}
1354
+ },
1355
+ "lessons": {
1356
+ "name": "lessons",
1357
+ "columns": {
1358
+ "id": {
1359
+ "name": "id",
1360
+ "type": "text",
1361
+ "primaryKey": true,
1362
+ "notNull": true,
1363
+ "autoincrement": false
1364
+ },
1365
+ "course_id": {
1366
+ "name": "course_id",
1367
+ "type": "text",
1368
+ "primaryKey": false,
1369
+ "notNull": true,
1370
+ "autoincrement": false
1371
+ },
1372
+ "topic_id": {
1373
+ "name": "topic_id",
1374
+ "type": "text",
1375
+ "primaryKey": false,
1376
+ "notNull": true,
1377
+ "autoincrement": false
1378
+ },
1379
+ "topic_title": {
1380
+ "name": "topic_title",
1381
+ "type": "text",
1382
+ "primaryKey": false,
1383
+ "notNull": true,
1384
+ "autoincrement": false
1385
+ },
1386
+ "position": {
1387
+ "name": "position",
1388
+ "type": "integer",
1389
+ "primaryKey": false,
1390
+ "notNull": true,
1391
+ "autoincrement": false
1392
+ },
1393
+ "session_id": {
1394
+ "name": "session_id",
1395
+ "type": "text",
1396
+ "primaryKey": false,
1397
+ "notNull": true,
1398
+ "autoincrement": false
1399
+ },
1400
+ "status": {
1401
+ "name": "status",
1402
+ "type": "text",
1403
+ "primaryKey": false,
1404
+ "notNull": true,
1405
+ "autoincrement": false
1406
+ },
1407
+ "error": {
1408
+ "name": "error",
1409
+ "type": "text",
1410
+ "primaryKey": false,
1411
+ "notNull": false,
1412
+ "autoincrement": false
1413
+ },
1414
+ "error_action": {
1415
+ "name": "error_action",
1416
+ "type": "text",
1417
+ "primaryKey": false,
1418
+ "notNull": false,
1419
+ "autoincrement": false
1420
+ },
1421
+ "created_at": {
1422
+ "name": "created_at",
1423
+ "type": "integer",
1424
+ "primaryKey": false,
1425
+ "notNull": true,
1426
+ "autoincrement": false
1427
+ },
1428
+ "finished_at": {
1429
+ "name": "finished_at",
1430
+ "type": "integer",
1431
+ "primaryKey": false,
1432
+ "notNull": false,
1433
+ "autoincrement": false
1434
+ }
1435
+ },
1436
+ "indexes": {
1437
+ "lessons_course_topic_idx": {
1438
+ "name": "lessons_course_topic_idx",
1439
+ "columns": [
1440
+ "course_id",
1441
+ "topic_id"
1442
+ ],
1443
+ "isUnique": true
1444
+ },
1445
+ "lessons_session_idx": {
1446
+ "name": "lessons_session_idx",
1447
+ "columns": [
1448
+ "session_id"
1449
+ ],
1450
+ "isUnique": true
1451
+ }
1452
+ },
1453
+ "foreignKeys": {
1454
+ "lessons_course_id_courses_id_fk": {
1455
+ "name": "lessons_course_id_courses_id_fk",
1456
+ "tableFrom": "lessons",
1457
+ "tableTo": "courses",
1458
+ "columnsFrom": [
1459
+ "course_id"
1460
+ ],
1461
+ "columnsTo": [
1462
+ "id"
1463
+ ],
1464
+ "onDelete": "cascade",
1465
+ "onUpdate": "no action"
1466
+ },
1467
+ "lessons_session_id_sessions_id_fk": {
1468
+ "name": "lessons_session_id_sessions_id_fk",
1469
+ "tableFrom": "lessons",
1470
+ "tableTo": "sessions",
1471
+ "columnsFrom": [
1472
+ "session_id"
1473
+ ],
1474
+ "columnsTo": [
1475
+ "id"
1476
+ ],
1477
+ "onDelete": "cascade",
1478
+ "onUpdate": "no action"
1479
+ }
1480
+ },
1481
+ "compositePrimaryKeys": {},
1482
+ "uniqueConstraints": {},
1483
+ "checkConstraints": {}
1484
+ },
1485
+ "memories": {
1486
+ "name": "memories",
1487
+ "columns": {
1488
+ "id": {
1489
+ "name": "id",
1490
+ "type": "text",
1491
+ "primaryKey": true,
1492
+ "notNull": true,
1493
+ "autoincrement": false
1494
+ },
1495
+ "kind": {
1496
+ "name": "kind",
1497
+ "type": "text",
1498
+ "primaryKey": false,
1499
+ "notNull": true,
1500
+ "autoincrement": false
1501
+ },
1502
+ "text": {
1503
+ "name": "text",
1504
+ "type": "text",
1505
+ "primaryKey": false,
1506
+ "notNull": true,
1507
+ "autoincrement": false
1508
+ },
1509
+ "concept": {
1510
+ "name": "concept",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": false,
1514
+ "autoincrement": false
1515
+ },
1516
+ "basis": {
1517
+ "name": "basis",
1518
+ "type": "text",
1519
+ "primaryKey": false,
1520
+ "notNull": true,
1521
+ "autoincrement": false
1522
+ },
1523
+ "attempt_id": {
1524
+ "name": "attempt_id",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": false,
1528
+ "autoincrement": false
1529
+ },
1530
+ "session_id": {
1531
+ "name": "session_id",
1532
+ "type": "text",
1533
+ "primaryKey": false,
1534
+ "notNull": false,
1535
+ "autoincrement": false
1536
+ },
1537
+ "run_id": {
1538
+ "name": "run_id",
1539
+ "type": "text",
1540
+ "primaryKey": false,
1541
+ "notNull": false,
1542
+ "autoincrement": false
1543
+ },
1544
+ "status": {
1545
+ "name": "status",
1546
+ "type": "text",
1547
+ "primaryKey": false,
1548
+ "notNull": true,
1549
+ "autoincrement": false
1550
+ },
1551
+ "replaces_id": {
1552
+ "name": "replaces_id",
1553
+ "type": "text",
1554
+ "primaryKey": false,
1555
+ "notNull": false,
1556
+ "autoincrement": false
1557
+ },
1558
+ "note_id": {
1559
+ "name": "note_id",
1560
+ "type": "text",
1561
+ "primaryKey": false,
1562
+ "notNull": false,
1563
+ "autoincrement": false
1564
+ },
1565
+ "created_at": {
1566
+ "name": "created_at",
1567
+ "type": "integer",
1568
+ "primaryKey": false,
1569
+ "notNull": true,
1570
+ "autoincrement": false
1571
+ },
1572
+ "edited_at": {
1573
+ "name": "edited_at",
1574
+ "type": "integer",
1575
+ "primaryKey": false,
1576
+ "notNull": false,
1577
+ "autoincrement": false
1578
+ }
1579
+ },
1580
+ "indexes": {
1581
+ "memories_status_idx": {
1582
+ "name": "memories_status_idx",
1583
+ "columns": [
1584
+ "status",
1585
+ "created_at"
1586
+ ],
1587
+ "isUnique": false
1588
+ },
1589
+ "memories_run_idx": {
1590
+ "name": "memories_run_idx",
1591
+ "columns": [
1592
+ "run_id"
1593
+ ],
1594
+ "isUnique": false
1595
+ },
1596
+ "memories_note_idx": {
1597
+ "name": "memories_note_idx",
1598
+ "columns": [
1599
+ "note_id"
1600
+ ],
1601
+ "isUnique": false
1602
+ }
1603
+ },
1604
+ "foreignKeys": {
1605
+ "memories_attempt_id_attempts_id_fk": {
1606
+ "name": "memories_attempt_id_attempts_id_fk",
1607
+ "tableFrom": "memories",
1608
+ "tableTo": "attempts",
1609
+ "columnsFrom": [
1610
+ "attempt_id"
1611
+ ],
1612
+ "columnsTo": [
1613
+ "id"
1614
+ ],
1615
+ "onDelete": "set null",
1616
+ "onUpdate": "no action"
1617
+ },
1618
+ "memories_session_id_sessions_id_fk": {
1619
+ "name": "memories_session_id_sessions_id_fk",
1620
+ "tableFrom": "memories",
1621
+ "tableTo": "sessions",
1622
+ "columnsFrom": [
1623
+ "session_id"
1624
+ ],
1625
+ "columnsTo": [
1626
+ "id"
1627
+ ],
1628
+ "onDelete": "set null",
1629
+ "onUpdate": "no action"
1630
+ },
1631
+ "memories_run_id_runs_id_fk": {
1632
+ "name": "memories_run_id_runs_id_fk",
1633
+ "tableFrom": "memories",
1634
+ "tableTo": "runs",
1635
+ "columnsFrom": [
1636
+ "run_id"
1637
+ ],
1638
+ "columnsTo": [
1639
+ "id"
1640
+ ],
1641
+ "onDelete": "set null",
1642
+ "onUpdate": "no action"
1643
+ },
1644
+ "memories_note_id_notes_id_fk": {
1645
+ "name": "memories_note_id_notes_id_fk",
1646
+ "tableFrom": "memories",
1647
+ "tableTo": "notes",
1648
+ "columnsFrom": [
1649
+ "note_id"
1650
+ ],
1651
+ "columnsTo": [
1652
+ "id"
1653
+ ],
1654
+ "onDelete": "cascade",
1655
+ "onUpdate": "no action"
1656
+ }
1657
+ },
1658
+ "compositePrimaryKeys": {},
1659
+ "uniqueConstraints": {},
1660
+ "checkConstraints": {}
1661
+ },
1662
+ "memory_sources": {
1663
+ "name": "memory_sources",
1664
+ "columns": {
1665
+ "memory_id": {
1666
+ "name": "memory_id",
1667
+ "type": "text",
1668
+ "primaryKey": false,
1669
+ "notNull": true,
1670
+ "autoincrement": false
1671
+ },
1672
+ "note_id": {
1673
+ "name": "note_id",
1674
+ "type": "text",
1675
+ "primaryKey": false,
1676
+ "notNull": true,
1677
+ "autoincrement": false
1678
+ },
1679
+ "text": {
1680
+ "name": "text",
1681
+ "type": "text",
1682
+ "primaryKey": false,
1683
+ "notNull": true,
1684
+ "autoincrement": false
1685
+ }
1686
+ },
1687
+ "indexes": {
1688
+ "memory_sources_note_idx": {
1689
+ "name": "memory_sources_note_idx",
1690
+ "columns": [
1691
+ "note_id"
1692
+ ],
1693
+ "isUnique": false
1694
+ }
1695
+ },
1696
+ "foreignKeys": {
1697
+ "memory_sources_memory_id_memories_id_fk": {
1698
+ "name": "memory_sources_memory_id_memories_id_fk",
1699
+ "tableFrom": "memory_sources",
1700
+ "tableTo": "memories",
1701
+ "columnsFrom": [
1702
+ "memory_id"
1703
+ ],
1704
+ "columnsTo": [
1705
+ "id"
1706
+ ],
1707
+ "onDelete": "cascade",
1708
+ "onUpdate": "no action"
1709
+ },
1710
+ "memory_sources_note_id_notes_id_fk": {
1711
+ "name": "memory_sources_note_id_notes_id_fk",
1712
+ "tableFrom": "memory_sources",
1713
+ "tableTo": "notes",
1714
+ "columnsFrom": [
1715
+ "note_id"
1716
+ ],
1717
+ "columnsTo": [
1718
+ "id"
1719
+ ],
1720
+ "onDelete": "cascade",
1721
+ "onUpdate": "no action"
1722
+ }
1723
+ },
1724
+ "compositePrimaryKeys": {
1725
+ "memory_sources_memory_id_note_id_pk": {
1726
+ "columns": [
1727
+ "memory_id",
1728
+ "note_id"
1729
+ ],
1730
+ "name": "memory_sources_memory_id_note_id_pk"
1731
+ }
1732
+ },
1733
+ "uniqueConstraints": {},
1734
+ "checkConstraints": {}
1735
+ },
1736
+ "messages": {
1737
+ "name": "messages",
1738
+ "columns": {
1739
+ "id": {
1740
+ "name": "id",
1741
+ "type": "text",
1742
+ "primaryKey": true,
1743
+ "notNull": true,
1744
+ "autoincrement": false
1745
+ },
1746
+ "session_id": {
1747
+ "name": "session_id",
1748
+ "type": "text",
1749
+ "primaryKey": false,
1750
+ "notNull": true,
1751
+ "autoincrement": false
1752
+ },
1753
+ "seq": {
1754
+ "name": "seq",
1755
+ "type": "integer",
1756
+ "primaryKey": false,
1757
+ "notNull": true,
1758
+ "autoincrement": false
1759
+ },
1760
+ "role": {
1761
+ "name": "role",
1762
+ "type": "text",
1763
+ "primaryKey": false,
1764
+ "notNull": true,
1765
+ "autoincrement": false
1766
+ },
1767
+ "parts": {
1768
+ "name": "parts",
1769
+ "type": "text",
1770
+ "primaryKey": false,
1771
+ "notNull": true,
1772
+ "autoincrement": false
1773
+ },
1774
+ "created_at": {
1775
+ "name": "created_at",
1776
+ "type": "integer",
1777
+ "primaryKey": false,
1778
+ "notNull": true,
1779
+ "autoincrement": false
1780
+ }
1781
+ },
1782
+ "indexes": {
1783
+ "messages_session_seq_idx": {
1784
+ "name": "messages_session_seq_idx",
1785
+ "columns": [
1786
+ "session_id",
1787
+ "seq"
1788
+ ],
1789
+ "isUnique": true
1790
+ }
1791
+ },
1792
+ "foreignKeys": {
1793
+ "messages_session_id_sessions_id_fk": {
1794
+ "name": "messages_session_id_sessions_id_fk",
1795
+ "tableFrom": "messages",
1796
+ "tableTo": "sessions",
1797
+ "columnsFrom": [
1798
+ "session_id"
1799
+ ],
1800
+ "columnsTo": [
1801
+ "id"
1802
+ ],
1803
+ "onDelete": "cascade",
1804
+ "onUpdate": "no action"
1805
+ }
1806
+ },
1807
+ "compositePrimaryKeys": {},
1808
+ "uniqueConstraints": {},
1809
+ "checkConstraints": {}
1810
+ },
1811
+ "note_aliases": {
1812
+ "name": "note_aliases",
1813
+ "columns": {
1814
+ "note_id": {
1815
+ "name": "note_id",
1816
+ "type": "text",
1817
+ "primaryKey": false,
1818
+ "notNull": true,
1819
+ "autoincrement": false
1820
+ },
1821
+ "alias_key": {
1822
+ "name": "alias_key",
1823
+ "type": "text",
1824
+ "primaryKey": false,
1825
+ "notNull": true,
1826
+ "autoincrement": false
1827
+ }
1828
+ },
1829
+ "indexes": {
1830
+ "note_aliases_alias_idx": {
1831
+ "name": "note_aliases_alias_idx",
1832
+ "columns": [
1833
+ "alias_key",
1834
+ "note_id"
1835
+ ],
1836
+ "isUnique": false
1837
+ }
1838
+ },
1839
+ "foreignKeys": {
1840
+ "note_aliases_note_id_notes_id_fk": {
1841
+ "name": "note_aliases_note_id_notes_id_fk",
1842
+ "tableFrom": "note_aliases",
1843
+ "tableTo": "notes",
1844
+ "columnsFrom": [
1845
+ "note_id"
1846
+ ],
1847
+ "columnsTo": [
1848
+ "id"
1849
+ ],
1850
+ "onDelete": "cascade",
1851
+ "onUpdate": "no action"
1852
+ }
1853
+ },
1854
+ "compositePrimaryKeys": {
1855
+ "note_aliases_note_id_alias_key_pk": {
1856
+ "columns": [
1857
+ "note_id",
1858
+ "alias_key"
1859
+ ],
1860
+ "name": "note_aliases_note_id_alias_key_pk"
1861
+ }
1862
+ },
1863
+ "uniqueConstraints": {},
1864
+ "checkConstraints": {}
1865
+ },
1866
+ "note_chunks": {
1867
+ "name": "note_chunks",
1868
+ "columns": {
1869
+ "id": {
1870
+ "name": "id",
1871
+ "type": "integer",
1872
+ "primaryKey": true,
1873
+ "notNull": true,
1874
+ "autoincrement": true
1875
+ },
1876
+ "note_id": {
1877
+ "name": "note_id",
1878
+ "type": "text",
1879
+ "primaryKey": false,
1880
+ "notNull": true,
1881
+ "autoincrement": false
1882
+ },
1883
+ "seq": {
1884
+ "name": "seq",
1885
+ "type": "integer",
1886
+ "primaryKey": false,
1887
+ "notNull": true,
1888
+ "autoincrement": false
1889
+ },
1890
+ "heading": {
1891
+ "name": "heading",
1892
+ "type": "text",
1893
+ "primaryKey": false,
1894
+ "notNull": false,
1895
+ "autoincrement": false
1896
+ },
1897
+ "text": {
1898
+ "name": "text",
1899
+ "type": "text",
1900
+ "primaryKey": false,
1901
+ "notNull": true,
1902
+ "autoincrement": false
1903
+ }
1904
+ },
1905
+ "indexes": {
1906
+ "note_chunks_note_seq_idx": {
1907
+ "name": "note_chunks_note_seq_idx",
1908
+ "columns": [
1909
+ "note_id",
1910
+ "seq"
1911
+ ],
1912
+ "isUnique": true
1913
+ }
1914
+ },
1915
+ "foreignKeys": {
1916
+ "note_chunks_note_id_notes_id_fk": {
1917
+ "name": "note_chunks_note_id_notes_id_fk",
1918
+ "tableFrom": "note_chunks",
1919
+ "tableTo": "notes",
1920
+ "columnsFrom": [
1921
+ "note_id"
1922
+ ],
1923
+ "columnsTo": [
1924
+ "id"
1925
+ ],
1926
+ "onDelete": "cascade",
1927
+ "onUpdate": "no action"
1928
+ }
1929
+ },
1930
+ "compositePrimaryKeys": {},
1931
+ "uniqueConstraints": {},
1932
+ "checkConstraints": {}
1933
+ },
1934
+ "note_links": {
1935
+ "name": "note_links",
1936
+ "columns": {
1937
+ "note_id": {
1938
+ "name": "note_id",
1939
+ "type": "text",
1940
+ "primaryKey": false,
1941
+ "notNull": true,
1942
+ "autoincrement": false
1943
+ },
1944
+ "target": {
1945
+ "name": "target",
1946
+ "type": "text",
1947
+ "primaryKey": false,
1948
+ "notNull": true,
1949
+ "autoincrement": false
1950
+ },
1951
+ "target_key": {
1952
+ "name": "target_key",
1953
+ "type": "text",
1954
+ "primaryKey": false,
1955
+ "notNull": true,
1956
+ "autoincrement": false,
1957
+ "default": "''"
1958
+ },
1959
+ "kind": {
1960
+ "name": "kind",
1961
+ "type": "text",
1962
+ "primaryKey": false,
1963
+ "notNull": true,
1964
+ "autoincrement": false
1965
+ }
1966
+ },
1967
+ "indexes": {
1968
+ "note_links_target_key_idx": {
1969
+ "name": "note_links_target_key_idx",
1970
+ "columns": [
1971
+ "target_key"
1972
+ ],
1973
+ "isUnique": false
1974
+ }
1975
+ },
1976
+ "foreignKeys": {
1977
+ "note_links_note_id_notes_id_fk": {
1978
+ "name": "note_links_note_id_notes_id_fk",
1979
+ "tableFrom": "note_links",
1980
+ "tableTo": "notes",
1981
+ "columnsFrom": [
1982
+ "note_id"
1983
+ ],
1984
+ "columnsTo": [
1985
+ "id"
1986
+ ],
1987
+ "onDelete": "cascade",
1988
+ "onUpdate": "no action"
1989
+ }
1990
+ },
1991
+ "compositePrimaryKeys": {
1992
+ "note_links_note_id_target_kind_pk": {
1993
+ "columns": [
1994
+ "note_id",
1995
+ "target",
1996
+ "kind"
1997
+ ],
1998
+ "name": "note_links_note_id_target_kind_pk"
1999
+ }
2000
+ },
2001
+ "uniqueConstraints": {},
2002
+ "checkConstraints": {}
2003
+ },
2004
+ "note_tags": {
2005
+ "name": "note_tags",
2006
+ "columns": {
2007
+ "note_id": {
2008
+ "name": "note_id",
2009
+ "type": "text",
2010
+ "primaryKey": false,
2011
+ "notNull": true,
2012
+ "autoincrement": false
2013
+ },
2014
+ "tag": {
2015
+ "name": "tag",
2016
+ "type": "text",
2017
+ "primaryKey": false,
2018
+ "notNull": true,
2019
+ "autoincrement": false
2020
+ }
2021
+ },
2022
+ "indexes": {
2023
+ "note_tags_tag_idx": {
2024
+ "name": "note_tags_tag_idx",
2025
+ "columns": [
2026
+ "tag"
2027
+ ],
2028
+ "isUnique": false
2029
+ }
2030
+ },
2031
+ "foreignKeys": {
2032
+ "note_tags_note_id_notes_id_fk": {
2033
+ "name": "note_tags_note_id_notes_id_fk",
2034
+ "tableFrom": "note_tags",
2035
+ "tableTo": "notes",
2036
+ "columnsFrom": [
2037
+ "note_id"
2038
+ ],
2039
+ "columnsTo": [
2040
+ "id"
2041
+ ],
2042
+ "onDelete": "cascade",
2043
+ "onUpdate": "no action"
2044
+ }
2045
+ },
2046
+ "compositePrimaryKeys": {
2047
+ "note_tags_note_id_tag_pk": {
2048
+ "columns": [
2049
+ "note_id",
2050
+ "tag"
2051
+ ],
2052
+ "name": "note_tags_note_id_tag_pk"
2053
+ }
2054
+ },
2055
+ "uniqueConstraints": {},
2056
+ "checkConstraints": {}
2057
+ },
2058
+ "notes": {
2059
+ "name": "notes",
2060
+ "columns": {
2061
+ "id": {
2062
+ "name": "id",
2063
+ "type": "text",
2064
+ "primaryKey": true,
2065
+ "notNull": true,
2066
+ "autoincrement": false
2067
+ },
2068
+ "import_id": {
2069
+ "name": "import_id",
2070
+ "type": "text",
2071
+ "primaryKey": false,
2072
+ "notNull": true,
2073
+ "autoincrement": false
2074
+ },
2075
+ "path": {
2076
+ "name": "path",
2077
+ "type": "text",
2078
+ "primaryKey": false,
2079
+ "notNull": true,
2080
+ "autoincrement": false
2081
+ },
2082
+ "title": {
2083
+ "name": "title",
2084
+ "type": "text",
2085
+ "primaryKey": false,
2086
+ "notNull": true,
2087
+ "autoincrement": false
2088
+ },
2089
+ "title_key": {
2090
+ "name": "title_key",
2091
+ "type": "text",
2092
+ "primaryKey": false,
2093
+ "notNull": true,
2094
+ "autoincrement": false
2095
+ },
2096
+ "aliases": {
2097
+ "name": "aliases",
2098
+ "type": "text",
2099
+ "primaryKey": false,
2100
+ "notNull": true,
2101
+ "autoincrement": false
2102
+ },
2103
+ "body": {
2104
+ "name": "body",
2105
+ "type": "text",
2106
+ "primaryKey": false,
2107
+ "notNull": true,
2108
+ "autoincrement": false
2109
+ },
2110
+ "hash": {
2111
+ "name": "hash",
2112
+ "type": "text",
2113
+ "primaryKey": false,
2114
+ "notNull": true,
2115
+ "autoincrement": false
2116
+ },
2117
+ "distilled_hash": {
2118
+ "name": "distilled_hash",
2119
+ "type": "text",
2120
+ "primaryKey": false,
2121
+ "notNull": false,
2122
+ "autoincrement": false
2123
+ },
2124
+ "created_at": {
2125
+ "name": "created_at",
2126
+ "type": "integer",
2127
+ "primaryKey": false,
2128
+ "notNull": true,
2129
+ "autoincrement": false
2130
+ },
2131
+ "updated_at": {
2132
+ "name": "updated_at",
2133
+ "type": "integer",
2134
+ "primaryKey": false,
2135
+ "notNull": true,
2136
+ "autoincrement": false
2137
+ }
2138
+ },
2139
+ "indexes": {
2140
+ "notes_import_path_idx": {
2141
+ "name": "notes_import_path_idx",
2142
+ "columns": [
2143
+ "import_id",
2144
+ "path"
2145
+ ],
2146
+ "isUnique": true
2147
+ },
2148
+ "notes_import_title_idx": {
2149
+ "name": "notes_import_title_idx",
2150
+ "columns": [
2151
+ "import_id",
2152
+ "title_key"
2153
+ ],
2154
+ "isUnique": false
2155
+ }
2156
+ },
2157
+ "foreignKeys": {
2158
+ "notes_import_id_vault_imports_id_fk": {
2159
+ "name": "notes_import_id_vault_imports_id_fk",
2160
+ "tableFrom": "notes",
2161
+ "tableTo": "vault_imports",
2162
+ "columnsFrom": [
2163
+ "import_id"
2164
+ ],
2165
+ "columnsTo": [
2166
+ "id"
2167
+ ],
2168
+ "onDelete": "cascade",
2169
+ "onUpdate": "no action"
2170
+ }
2171
+ },
2172
+ "compositePrimaryKeys": {},
2173
+ "uniqueConstraints": {},
2174
+ "checkConstraints": {}
2175
+ },
2176
+ "review_sessions": {
2177
+ "name": "review_sessions",
2178
+ "columns": {
2179
+ "session_id": {
2180
+ "name": "session_id",
2181
+ "type": "text",
2182
+ "primaryKey": true,
2183
+ "notNull": true,
2184
+ "autoincrement": false
2185
+ },
2186
+ "concepts": {
2187
+ "name": "concepts",
2188
+ "type": "text",
2189
+ "primaryKey": false,
2190
+ "notNull": true,
2191
+ "autoincrement": false
2192
+ },
2193
+ "created_at": {
2194
+ "name": "created_at",
2195
+ "type": "integer",
2196
+ "primaryKey": false,
2197
+ "notNull": true,
2198
+ "autoincrement": false
2199
+ }
2200
+ },
2201
+ "indexes": {},
2202
+ "foreignKeys": {
2203
+ "review_sessions_session_id_sessions_id_fk": {
2204
+ "name": "review_sessions_session_id_sessions_id_fk",
2205
+ "tableFrom": "review_sessions",
2206
+ "tableTo": "sessions",
2207
+ "columnsFrom": [
2208
+ "session_id"
2209
+ ],
2210
+ "columnsTo": [
2211
+ "id"
2212
+ ],
2213
+ "onDelete": "cascade",
2214
+ "onUpdate": "no action"
2215
+ }
2216
+ },
2217
+ "compositePrimaryKeys": {},
2218
+ "uniqueConstraints": {},
2219
+ "checkConstraints": {}
2220
+ },
2221
+ "runs": {
2222
+ "name": "runs",
2223
+ "columns": {
2224
+ "id": {
2225
+ "name": "id",
2226
+ "type": "text",
2227
+ "primaryKey": true,
2228
+ "notNull": true,
2229
+ "autoincrement": false
2230
+ },
2231
+ "session_id": {
2232
+ "name": "session_id",
2233
+ "type": "text",
2234
+ "primaryKey": false,
2235
+ "notNull": true,
2236
+ "autoincrement": false
2237
+ },
2238
+ "user_message_id": {
2239
+ "name": "user_message_id",
2240
+ "type": "text",
2241
+ "primaryKey": false,
2242
+ "notNull": true,
2243
+ "autoincrement": false
2244
+ },
2245
+ "continuation_of": {
2246
+ "name": "continuation_of",
2247
+ "type": "text",
2248
+ "primaryKey": false,
2249
+ "notNull": false,
2250
+ "autoincrement": false
2251
+ },
2252
+ "assistant_message_id": {
2253
+ "name": "assistant_message_id",
2254
+ "type": "text",
2255
+ "primaryKey": false,
2256
+ "notNull": false,
2257
+ "autoincrement": false
2258
+ },
2259
+ "status": {
2260
+ "name": "status",
2261
+ "type": "text",
2262
+ "primaryKey": false,
2263
+ "notNull": true,
2264
+ "autoincrement": false
2265
+ },
2266
+ "model": {
2267
+ "name": "model",
2268
+ "type": "text",
2269
+ "primaryKey": false,
2270
+ "notNull": false,
2271
+ "autoincrement": false
2272
+ },
2273
+ "effort": {
2274
+ "name": "effort",
2275
+ "type": "text",
2276
+ "primaryKey": false,
2277
+ "notNull": false,
2278
+ "autoincrement": false
2279
+ },
2280
+ "endpoint": {
2281
+ "name": "endpoint",
2282
+ "type": "text",
2283
+ "primaryKey": false,
2284
+ "notNull": false,
2285
+ "autoincrement": false
2286
+ },
2287
+ "lesson_id": {
2288
+ "name": "lesson_id",
2289
+ "type": "text",
2290
+ "primaryKey": false,
2291
+ "notNull": false,
2292
+ "autoincrement": false
2293
+ },
2294
+ "error": {
2295
+ "name": "error",
2296
+ "type": "text",
2297
+ "primaryKey": false,
2298
+ "notNull": false,
2299
+ "autoincrement": false
2300
+ },
2301
+ "started_at": {
2302
+ "name": "started_at",
2303
+ "type": "integer",
2304
+ "primaryKey": false,
2305
+ "notNull": true,
2306
+ "autoincrement": false
2307
+ },
2308
+ "ended_at": {
2309
+ "name": "ended_at",
2310
+ "type": "integer",
2311
+ "primaryKey": false,
2312
+ "notNull": false,
2313
+ "autoincrement": false
2314
+ }
2315
+ },
2316
+ "indexes": {
2317
+ "runs_continuation_once_idx": {
2318
+ "name": "runs_continuation_once_idx",
2319
+ "columns": [
2320
+ "continuation_of"
2321
+ ],
2322
+ "isUnique": true
2323
+ },
2324
+ "runs_session_idx": {
2325
+ "name": "runs_session_idx",
2326
+ "columns": [
2327
+ "session_id",
2328
+ "started_at"
2329
+ ],
2330
+ "isUnique": false
2331
+ },
2332
+ "runs_one_running_per_session_idx": {
2333
+ "name": "runs_one_running_per_session_idx",
2334
+ "columns": [
2335
+ "session_id"
2336
+ ],
2337
+ "isUnique": true,
2338
+ "where": "\"runs\".\"status\" = 'running'"
2339
+ }
2340
+ },
2341
+ "foreignKeys": {
2342
+ "runs_session_id_sessions_id_fk": {
2343
+ "name": "runs_session_id_sessions_id_fk",
2344
+ "tableFrom": "runs",
2345
+ "tableTo": "sessions",
2346
+ "columnsFrom": [
2347
+ "session_id"
2348
+ ],
2349
+ "columnsTo": [
2350
+ "id"
2351
+ ],
2352
+ "onDelete": "cascade",
2353
+ "onUpdate": "no action"
2354
+ },
2355
+ "runs_user_message_id_messages_id_fk": {
2356
+ "name": "runs_user_message_id_messages_id_fk",
2357
+ "tableFrom": "runs",
2358
+ "tableTo": "messages",
2359
+ "columnsFrom": [
2360
+ "user_message_id"
2361
+ ],
2362
+ "columnsTo": [
2363
+ "id"
2364
+ ],
2365
+ "onDelete": "cascade",
2366
+ "onUpdate": "no action"
2367
+ },
2368
+ "runs_assistant_message_id_messages_id_fk": {
2369
+ "name": "runs_assistant_message_id_messages_id_fk",
2370
+ "tableFrom": "runs",
2371
+ "tableTo": "messages",
2372
+ "columnsFrom": [
2373
+ "assistant_message_id"
2374
+ ],
2375
+ "columnsTo": [
2376
+ "id"
2377
+ ],
2378
+ "onDelete": "set null",
2379
+ "onUpdate": "no action"
2380
+ }
2381
+ },
2382
+ "compositePrimaryKeys": {},
2383
+ "uniqueConstraints": {},
2384
+ "checkConstraints": {}
2385
+ },
2386
+ "session_documents": {
2387
+ "name": "session_documents",
2388
+ "columns": {
2389
+ "session_id": {
2390
+ "name": "session_id",
2391
+ "type": "text",
2392
+ "primaryKey": false,
2393
+ "notNull": true,
2394
+ "autoincrement": false
2395
+ },
2396
+ "document_id": {
2397
+ "name": "document_id",
2398
+ "type": "text",
2399
+ "primaryKey": false,
2400
+ "notNull": true,
2401
+ "autoincrement": false
2402
+ },
2403
+ "message_id": {
2404
+ "name": "message_id",
2405
+ "type": "text",
2406
+ "primaryKey": false,
2407
+ "notNull": false,
2408
+ "autoincrement": false
2409
+ },
2410
+ "attached_at": {
2411
+ "name": "attached_at",
2412
+ "type": "integer",
2413
+ "primaryKey": false,
2414
+ "notNull": true,
2415
+ "autoincrement": false
2416
+ }
2417
+ },
2418
+ "indexes": {
2419
+ "session_documents_session_idx": {
2420
+ "name": "session_documents_session_idx",
2421
+ "columns": [
2422
+ "session_id",
2423
+ "attached_at"
2424
+ ],
2425
+ "isUnique": false
2426
+ },
2427
+ "session_documents_document_idx": {
2428
+ "name": "session_documents_document_idx",
2429
+ "columns": [
2430
+ "document_id"
2431
+ ],
2432
+ "isUnique": false
2433
+ }
2434
+ },
2435
+ "foreignKeys": {
2436
+ "session_documents_session_id_sessions_id_fk": {
2437
+ "name": "session_documents_session_id_sessions_id_fk",
2438
+ "tableFrom": "session_documents",
2439
+ "tableTo": "sessions",
2440
+ "columnsFrom": [
2441
+ "session_id"
2442
+ ],
2443
+ "columnsTo": [
2444
+ "id"
2445
+ ],
2446
+ "onDelete": "cascade",
2447
+ "onUpdate": "no action"
2448
+ },
2449
+ "session_documents_document_id_documents_id_fk": {
2450
+ "name": "session_documents_document_id_documents_id_fk",
2451
+ "tableFrom": "session_documents",
2452
+ "tableTo": "documents",
2453
+ "columnsFrom": [
2454
+ "document_id"
2455
+ ],
2456
+ "columnsTo": [
2457
+ "id"
2458
+ ],
2459
+ "onDelete": "cascade",
2460
+ "onUpdate": "no action"
2461
+ },
2462
+ "session_documents_message_id_messages_id_fk": {
2463
+ "name": "session_documents_message_id_messages_id_fk",
2464
+ "tableFrom": "session_documents",
2465
+ "tableTo": "messages",
2466
+ "columnsFrom": [
2467
+ "message_id"
2468
+ ],
2469
+ "columnsTo": [
2470
+ "id"
2471
+ ],
2472
+ "onDelete": "set null",
2473
+ "onUpdate": "no action"
2474
+ }
2475
+ },
2476
+ "compositePrimaryKeys": {
2477
+ "session_documents_session_id_document_id_pk": {
2478
+ "columns": [
2479
+ "session_id",
2480
+ "document_id"
2481
+ ],
2482
+ "name": "session_documents_session_id_document_id_pk"
2483
+ }
2484
+ },
2485
+ "uniqueConstraints": {},
2486
+ "checkConstraints": {}
2487
+ },
2488
+ "sessions": {
2489
+ "name": "sessions",
2490
+ "columns": {
2491
+ "id": {
2492
+ "name": "id",
2493
+ "type": "text",
2494
+ "primaryKey": true,
2495
+ "notNull": true,
2496
+ "autoincrement": false
2497
+ },
2498
+ "title": {
2499
+ "name": "title",
2500
+ "type": "text",
2501
+ "primaryKey": false,
2502
+ "notNull": true,
2503
+ "autoincrement": false
2504
+ },
2505
+ "title_set_by_learner": {
2506
+ "name": "title_set_by_learner",
2507
+ "type": "integer",
2508
+ "primaryKey": false,
2509
+ "notNull": true,
2510
+ "autoincrement": false,
2511
+ "default": false
2512
+ },
2513
+ "created_at": {
2514
+ "name": "created_at",
2515
+ "type": "integer",
2516
+ "primaryKey": false,
2517
+ "notNull": true,
2518
+ "autoincrement": false
2519
+ },
2520
+ "updated_at": {
2521
+ "name": "updated_at",
2522
+ "type": "integer",
2523
+ "primaryKey": false,
2524
+ "notNull": true,
2525
+ "autoincrement": false
2526
+ }
2527
+ },
2528
+ "indexes": {},
2529
+ "foreignKeys": {},
2530
+ "compositePrimaryKeys": {},
2531
+ "uniqueConstraints": {},
2532
+ "checkConstraints": {}
2533
+ },
2534
+ "settings": {
2535
+ "name": "settings",
2536
+ "columns": {
2537
+ "key": {
2538
+ "name": "key",
2539
+ "type": "text",
2540
+ "primaryKey": true,
2541
+ "notNull": true,
2542
+ "autoincrement": false
2543
+ },
2544
+ "value": {
2545
+ "name": "value",
2546
+ "type": "text",
2547
+ "primaryKey": false,
2548
+ "notNull": true,
2549
+ "autoincrement": false
2550
+ },
2551
+ "updated_at": {
2552
+ "name": "updated_at",
2553
+ "type": "integer",
2554
+ "primaryKey": false,
2555
+ "notNull": true,
2556
+ "autoincrement": false
2557
+ }
2558
+ },
2559
+ "indexes": {},
2560
+ "foreignKeys": {},
2561
+ "compositePrimaryKeys": {},
2562
+ "uniqueConstraints": {},
2563
+ "checkConstraints": {}
2564
+ },
2565
+ "syllabus_versions": {
2566
+ "name": "syllabus_versions",
2567
+ "columns": {
2568
+ "id": {
2569
+ "name": "id",
2570
+ "type": "text",
2571
+ "primaryKey": true,
2572
+ "notNull": true,
2573
+ "autoincrement": false
2574
+ },
2575
+ "course_id": {
2576
+ "name": "course_id",
2577
+ "type": "text",
2578
+ "primaryKey": false,
2579
+ "notNull": true,
2580
+ "autoincrement": false
2581
+ },
2582
+ "version": {
2583
+ "name": "version",
2584
+ "type": "integer",
2585
+ "primaryKey": false,
2586
+ "notNull": true,
2587
+ "autoincrement": false
2588
+ },
2589
+ "topics": {
2590
+ "name": "topics",
2591
+ "type": "text",
2592
+ "primaryKey": false,
2593
+ "notNull": true,
2594
+ "autoincrement": false
2595
+ },
2596
+ "known": {
2597
+ "name": "known",
2598
+ "type": "text",
2599
+ "primaryKey": false,
2600
+ "notNull": true,
2601
+ "autoincrement": false
2602
+ },
2603
+ "source": {
2604
+ "name": "source",
2605
+ "type": "text",
2606
+ "primaryKey": false,
2607
+ "notNull": true,
2608
+ "autoincrement": false,
2609
+ "default": "'interview'"
2610
+ },
2611
+ "trigger_lesson_id": {
2612
+ "name": "trigger_lesson_id",
2613
+ "type": "text",
2614
+ "primaryKey": false,
2615
+ "notNull": false,
2616
+ "autoincrement": false
2617
+ },
2618
+ "reason": {
2619
+ "name": "reason",
2620
+ "type": "text",
2621
+ "primaryKey": false,
2622
+ "notNull": false,
2623
+ "autoincrement": false
2624
+ },
2625
+ "changed_topic_ids": {
2626
+ "name": "changed_topic_ids",
2627
+ "type": "text",
2628
+ "primaryKey": false,
2629
+ "notNull": true,
2630
+ "autoincrement": false,
2631
+ "default": "'[]'"
2632
+ },
2633
+ "run_id": {
2634
+ "name": "run_id",
2635
+ "type": "text",
2636
+ "primaryKey": false,
2637
+ "notNull": false,
2638
+ "autoincrement": false
2639
+ },
2640
+ "created_at": {
2641
+ "name": "created_at",
2642
+ "type": "integer",
2643
+ "primaryKey": false,
2644
+ "notNull": true,
2645
+ "autoincrement": false
2646
+ }
2647
+ },
2648
+ "indexes": {
2649
+ "syllabus_versions_course_version_idx": {
2650
+ "name": "syllabus_versions_course_version_idx",
2651
+ "columns": [
2652
+ "course_id",
2653
+ "version"
2654
+ ],
2655
+ "isUnique": true
2656
+ }
2657
+ },
2658
+ "foreignKeys": {
2659
+ "syllabus_versions_course_id_courses_id_fk": {
2660
+ "name": "syllabus_versions_course_id_courses_id_fk",
2661
+ "tableFrom": "syllabus_versions",
2662
+ "tableTo": "courses",
2663
+ "columnsFrom": [
2664
+ "course_id"
2665
+ ],
2666
+ "columnsTo": [
2667
+ "id"
2668
+ ],
2669
+ "onDelete": "cascade",
2670
+ "onUpdate": "no action"
2671
+ },
2672
+ "syllabus_versions_run_id_runs_id_fk": {
2673
+ "name": "syllabus_versions_run_id_runs_id_fk",
2674
+ "tableFrom": "syllabus_versions",
2675
+ "tableTo": "runs",
2676
+ "columnsFrom": [
2677
+ "run_id"
2678
+ ],
2679
+ "columnsTo": [
2680
+ "id"
2681
+ ],
2682
+ "onDelete": "set null",
2683
+ "onUpdate": "no action"
2684
+ }
2685
+ },
2686
+ "compositePrimaryKeys": {},
2687
+ "uniqueConstraints": {},
2688
+ "checkConstraints": {}
2689
+ },
2690
+ "usage_records": {
2691
+ "name": "usage_records",
2692
+ "columns": {
2693
+ "id": {
2694
+ "name": "id",
2695
+ "type": "text",
2696
+ "primaryKey": true,
2697
+ "notNull": true,
2698
+ "autoincrement": false
2699
+ },
2700
+ "kind": {
2701
+ "name": "kind",
2702
+ "type": "text",
2703
+ "primaryKey": false,
2704
+ "notNull": true,
2705
+ "autoincrement": false
2706
+ },
2707
+ "status": {
2708
+ "name": "status",
2709
+ "type": "text",
2710
+ "primaryKey": false,
2711
+ "notNull": true,
2712
+ "autoincrement": false
2713
+ },
2714
+ "session_id": {
2715
+ "name": "session_id",
2716
+ "type": "text",
2717
+ "primaryKey": false,
2718
+ "notNull": false,
2719
+ "autoincrement": false
2720
+ },
2721
+ "run_id": {
2722
+ "name": "run_id",
2723
+ "type": "text",
2724
+ "primaryKey": false,
2725
+ "notNull": false,
2726
+ "autoincrement": false
2727
+ },
2728
+ "seq": {
2729
+ "name": "seq",
2730
+ "type": "integer",
2731
+ "primaryKey": false,
2732
+ "notNull": true,
2733
+ "autoincrement": false
2734
+ },
2735
+ "provider": {
2736
+ "name": "provider",
2737
+ "type": "text",
2738
+ "primaryKey": false,
2739
+ "notNull": true,
2740
+ "autoincrement": false
2741
+ },
2742
+ "provider_label": {
2743
+ "name": "provider_label",
2744
+ "type": "text",
2745
+ "primaryKey": false,
2746
+ "notNull": true,
2747
+ "autoincrement": false
2748
+ },
2749
+ "model": {
2750
+ "name": "model",
2751
+ "type": "text",
2752
+ "primaryKey": false,
2753
+ "notNull": true,
2754
+ "autoincrement": false
2755
+ },
2756
+ "model_label": {
2757
+ "name": "model_label",
2758
+ "type": "text",
2759
+ "primaryKey": false,
2760
+ "notNull": false,
2761
+ "autoincrement": false
2762
+ },
2763
+ "effort": {
2764
+ "name": "effort",
2765
+ "type": "text",
2766
+ "primaryKey": false,
2767
+ "notNull": false,
2768
+ "autoincrement": false
2769
+ },
2770
+ "billing": {
2771
+ "name": "billing",
2772
+ "type": "text",
2773
+ "primaryKey": false,
2774
+ "notNull": true,
2775
+ "autoincrement": false
2776
+ },
2777
+ "input_tokens": {
2778
+ "name": "input_tokens",
2779
+ "type": "integer",
2780
+ "primaryKey": false,
2781
+ "notNull": false,
2782
+ "autoincrement": false
2783
+ },
2784
+ "input_no_cache_tokens": {
2785
+ "name": "input_no_cache_tokens",
2786
+ "type": "integer",
2787
+ "primaryKey": false,
2788
+ "notNull": false,
2789
+ "autoincrement": false
2790
+ },
2791
+ "input_cache_read_tokens": {
2792
+ "name": "input_cache_read_tokens",
2793
+ "type": "integer",
2794
+ "primaryKey": false,
2795
+ "notNull": false,
2796
+ "autoincrement": false
2797
+ },
2798
+ "input_cache_write_tokens": {
2799
+ "name": "input_cache_write_tokens",
2800
+ "type": "integer",
2801
+ "primaryKey": false,
2802
+ "notNull": false,
2803
+ "autoincrement": false
2804
+ },
2805
+ "output_tokens": {
2806
+ "name": "output_tokens",
2807
+ "type": "integer",
2808
+ "primaryKey": false,
2809
+ "notNull": false,
2810
+ "autoincrement": false
2811
+ },
2812
+ "output_reasoning_tokens": {
2813
+ "name": "output_reasoning_tokens",
2814
+ "type": "integer",
2815
+ "primaryKey": false,
2816
+ "notNull": false,
2817
+ "autoincrement": false
2818
+ },
2819
+ "reported_cost": {
2820
+ "name": "reported_cost",
2821
+ "type": "real",
2822
+ "primaryKey": false,
2823
+ "notNull": false,
2824
+ "autoincrement": false
2825
+ },
2826
+ "price": {
2827
+ "name": "price",
2828
+ "type": "text",
2829
+ "primaryKey": false,
2830
+ "notNull": false,
2831
+ "autoincrement": false
2832
+ },
2833
+ "estimated_cost": {
2834
+ "name": "estimated_cost",
2835
+ "type": "real",
2836
+ "primaryKey": false,
2837
+ "notNull": false,
2838
+ "autoincrement": false
2839
+ },
2840
+ "started_at": {
2841
+ "name": "started_at",
2842
+ "type": "integer",
2843
+ "primaryKey": false,
2844
+ "notNull": true,
2845
+ "autoincrement": false
2846
+ },
2847
+ "ended_at": {
2848
+ "name": "ended_at",
2849
+ "type": "integer",
2850
+ "primaryKey": false,
2851
+ "notNull": true,
2852
+ "autoincrement": false
2853
+ }
2854
+ },
2855
+ "indexes": {
2856
+ "usage_records_started_idx": {
2857
+ "name": "usage_records_started_idx",
2858
+ "columns": [
2859
+ "started_at"
2860
+ ],
2861
+ "isUnique": false
2862
+ },
2863
+ "usage_records_run_idx": {
2864
+ "name": "usage_records_run_idx",
2865
+ "columns": [
2866
+ "run_id"
2867
+ ],
2868
+ "isUnique": false
2869
+ }
2870
+ },
2871
+ "foreignKeys": {},
2872
+ "compositePrimaryKeys": {},
2873
+ "uniqueConstraints": {},
2874
+ "checkConstraints": {}
2875
+ },
2876
+ "vault_imports": {
2877
+ "name": "vault_imports",
2878
+ "columns": {
2879
+ "id": {
2880
+ "name": "id",
2881
+ "type": "text",
2882
+ "primaryKey": true,
2883
+ "notNull": true,
2884
+ "autoincrement": false
2885
+ },
2886
+ "name": {
2887
+ "name": "name",
2888
+ "type": "text",
2889
+ "primaryKey": false,
2890
+ "notNull": true,
2891
+ "autoincrement": false
2892
+ },
2893
+ "source": {
2894
+ "name": "source",
2895
+ "type": "text",
2896
+ "primaryKey": false,
2897
+ "notNull": true,
2898
+ "autoincrement": false
2899
+ },
2900
+ "created_at": {
2901
+ "name": "created_at",
2902
+ "type": "integer",
2903
+ "primaryKey": false,
2904
+ "notNull": true,
2905
+ "autoincrement": false
2906
+ },
2907
+ "updated_at": {
2908
+ "name": "updated_at",
2909
+ "type": "integer",
2910
+ "primaryKey": false,
2911
+ "notNull": true,
2912
+ "autoincrement": false
2913
+ }
2914
+ },
2915
+ "indexes": {
2916
+ "vault_imports_name_idx": {
2917
+ "name": "vault_imports_name_idx",
2918
+ "columns": [
2919
+ "name"
2920
+ ],
2921
+ "isUnique": true
2922
+ }
2923
+ },
2924
+ "foreignKeys": {},
2925
+ "compositePrimaryKeys": {},
2926
+ "uniqueConstraints": {},
2927
+ "checkConstraints": {}
2928
+ }
2929
+ },
2930
+ "views": {},
2931
+ "enums": {},
2932
+ "_meta": {
2933
+ "schemas": {},
2934
+ "tables": {},
2935
+ "columns": {}
2936
+ },
2937
+ "internal": {
2938
+ "indexes": {}
2939
+ }
2940
+ }