@okhay-p/mivra 0.1.6 → 0.1.7

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-CQjNLnxP.js +540 -0
  35. package/web/assets/index-DpV5il_3.css +1 -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,2654 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "f07a44e9-fcec-4b72-b9ce-1d8924c89fcc",
5
+ "prevId": "4eccc4be-c496-42ab-b00e-ce7a68f26192",
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
+ "status": {
777
+ "name": "status",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "autoincrement": false
782
+ },
783
+ "icon": {
784
+ "name": "icon",
785
+ "type": "text",
786
+ "primaryKey": false,
787
+ "notNull": false,
788
+ "autoincrement": false
789
+ },
790
+ "created_at": {
791
+ "name": "created_at",
792
+ "type": "integer",
793
+ "primaryKey": false,
794
+ "notNull": true,
795
+ "autoincrement": false
796
+ },
797
+ "updated_at": {
798
+ "name": "updated_at",
799
+ "type": "integer",
800
+ "primaryKey": false,
801
+ "notNull": true,
802
+ "autoincrement": false
803
+ }
804
+ },
805
+ "indexes": {
806
+ "courses_session_idx": {
807
+ "name": "courses_session_idx",
808
+ "columns": [
809
+ "session_id"
810
+ ],
811
+ "isUnique": true
812
+ }
813
+ },
814
+ "foreignKeys": {
815
+ "courses_session_id_sessions_id_fk": {
816
+ "name": "courses_session_id_sessions_id_fk",
817
+ "tableFrom": "courses",
818
+ "tableTo": "sessions",
819
+ "columnsFrom": [
820
+ "session_id"
821
+ ],
822
+ "columnsTo": [
823
+ "id"
824
+ ],
825
+ "onDelete": "cascade",
826
+ "onUpdate": "no action"
827
+ }
828
+ },
829
+ "compositePrimaryKeys": {},
830
+ "uniqueConstraints": {},
831
+ "checkConstraints": {}
832
+ },
833
+ "document_chunks": {
834
+ "name": "document_chunks",
835
+ "columns": {
836
+ "id": {
837
+ "name": "id",
838
+ "type": "integer",
839
+ "primaryKey": true,
840
+ "notNull": true,
841
+ "autoincrement": true
842
+ },
843
+ "document_id": {
844
+ "name": "document_id",
845
+ "type": "text",
846
+ "primaryKey": false,
847
+ "notNull": true,
848
+ "autoincrement": false
849
+ },
850
+ "page": {
851
+ "name": "page",
852
+ "type": "integer",
853
+ "primaryKey": false,
854
+ "notNull": true,
855
+ "autoincrement": false
856
+ },
857
+ "seq": {
858
+ "name": "seq",
859
+ "type": "integer",
860
+ "primaryKey": false,
861
+ "notNull": true,
862
+ "autoincrement": false
863
+ },
864
+ "text": {
865
+ "name": "text",
866
+ "type": "text",
867
+ "primaryKey": false,
868
+ "notNull": true,
869
+ "autoincrement": false
870
+ }
871
+ },
872
+ "indexes": {
873
+ "document_chunks_document_seq_idx": {
874
+ "name": "document_chunks_document_seq_idx",
875
+ "columns": [
876
+ "document_id",
877
+ "seq"
878
+ ],
879
+ "isUnique": true
880
+ }
881
+ },
882
+ "foreignKeys": {
883
+ "document_chunks_document_id_documents_id_fk": {
884
+ "name": "document_chunks_document_id_documents_id_fk",
885
+ "tableFrom": "document_chunks",
886
+ "tableTo": "documents",
887
+ "columnsFrom": [
888
+ "document_id"
889
+ ],
890
+ "columnsTo": [
891
+ "id"
892
+ ],
893
+ "onDelete": "cascade",
894
+ "onUpdate": "no action"
895
+ }
896
+ },
897
+ "compositePrimaryKeys": {},
898
+ "uniqueConstraints": {},
899
+ "checkConstraints": {}
900
+ },
901
+ "documents": {
902
+ "name": "documents",
903
+ "columns": {
904
+ "id": {
905
+ "name": "id",
906
+ "type": "text",
907
+ "primaryKey": true,
908
+ "notNull": true,
909
+ "autoincrement": false
910
+ },
911
+ "session_id": {
912
+ "name": "session_id",
913
+ "type": "text",
914
+ "primaryKey": false,
915
+ "notNull": true,
916
+ "autoincrement": false
917
+ },
918
+ "message_id": {
919
+ "name": "message_id",
920
+ "type": "text",
921
+ "primaryKey": false,
922
+ "notNull": false,
923
+ "autoincrement": false
924
+ },
925
+ "filename": {
926
+ "name": "filename",
927
+ "type": "text",
928
+ "primaryKey": false,
929
+ "notNull": true,
930
+ "autoincrement": false
931
+ },
932
+ "kind": {
933
+ "name": "kind",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true,
937
+ "autoincrement": false
938
+ },
939
+ "byte_size": {
940
+ "name": "byte_size",
941
+ "type": "integer",
942
+ "primaryKey": false,
943
+ "notNull": true,
944
+ "autoincrement": false
945
+ },
946
+ "text_chars": {
947
+ "name": "text_chars",
948
+ "type": "integer",
949
+ "primaryKey": false,
950
+ "notNull": true,
951
+ "autoincrement": false
952
+ },
953
+ "page_count": {
954
+ "name": "page_count",
955
+ "type": "integer",
956
+ "primaryKey": false,
957
+ "notNull": true,
958
+ "autoincrement": false
959
+ },
960
+ "pages_with_text": {
961
+ "name": "pages_with_text",
962
+ "type": "integer",
963
+ "primaryKey": false,
964
+ "notNull": true,
965
+ "autoincrement": false
966
+ },
967
+ "status": {
968
+ "name": "status",
969
+ "type": "text",
970
+ "primaryKey": false,
971
+ "notNull": true,
972
+ "autoincrement": false
973
+ },
974
+ "created_at": {
975
+ "name": "created_at",
976
+ "type": "integer",
977
+ "primaryKey": false,
978
+ "notNull": true,
979
+ "autoincrement": false
980
+ }
981
+ },
982
+ "indexes": {
983
+ "documents_session_idx": {
984
+ "name": "documents_session_idx",
985
+ "columns": [
986
+ "session_id",
987
+ "created_at"
988
+ ],
989
+ "isUnique": false
990
+ }
991
+ },
992
+ "foreignKeys": {
993
+ "documents_session_id_sessions_id_fk": {
994
+ "name": "documents_session_id_sessions_id_fk",
995
+ "tableFrom": "documents",
996
+ "tableTo": "sessions",
997
+ "columnsFrom": [
998
+ "session_id"
999
+ ],
1000
+ "columnsTo": [
1001
+ "id"
1002
+ ],
1003
+ "onDelete": "cascade",
1004
+ "onUpdate": "no action"
1005
+ },
1006
+ "documents_message_id_messages_id_fk": {
1007
+ "name": "documents_message_id_messages_id_fk",
1008
+ "tableFrom": "documents",
1009
+ "tableTo": "messages",
1010
+ "columnsFrom": [
1011
+ "message_id"
1012
+ ],
1013
+ "columnsTo": [
1014
+ "id"
1015
+ ],
1016
+ "onDelete": "set null",
1017
+ "onUpdate": "no action"
1018
+ }
1019
+ },
1020
+ "compositePrimaryKeys": {},
1021
+ "uniqueConstraints": {},
1022
+ "checkConstraints": {}
1023
+ },
1024
+ "lesson_sections": {
1025
+ "name": "lesson_sections",
1026
+ "columns": {
1027
+ "id": {
1028
+ "name": "id",
1029
+ "type": "text",
1030
+ "primaryKey": true,
1031
+ "notNull": true,
1032
+ "autoincrement": false
1033
+ },
1034
+ "lesson_id": {
1035
+ "name": "lesson_id",
1036
+ "type": "text",
1037
+ "primaryKey": false,
1038
+ "notNull": true,
1039
+ "autoincrement": false
1040
+ },
1041
+ "kind": {
1042
+ "name": "kind",
1043
+ "type": "text",
1044
+ "primaryKey": false,
1045
+ "notNull": true,
1046
+ "autoincrement": false
1047
+ },
1048
+ "title": {
1049
+ "name": "title",
1050
+ "type": "text",
1051
+ "primaryKey": false,
1052
+ "notNull": true,
1053
+ "autoincrement": false
1054
+ },
1055
+ "markdown": {
1056
+ "name": "markdown",
1057
+ "type": "text",
1058
+ "primaryKey": false,
1059
+ "notNull": false,
1060
+ "autoincrement": false
1061
+ },
1062
+ "artifact_id": {
1063
+ "name": "artifact_id",
1064
+ "type": "text",
1065
+ "primaryKey": false,
1066
+ "notNull": false,
1067
+ "autoincrement": false
1068
+ },
1069
+ "revisits": {
1070
+ "name": "revisits",
1071
+ "type": "text",
1072
+ "primaryKey": false,
1073
+ "notNull": true,
1074
+ "autoincrement": false,
1075
+ "default": "'[]'"
1076
+ },
1077
+ "created_at": {
1078
+ "name": "created_at",
1079
+ "type": "integer",
1080
+ "primaryKey": false,
1081
+ "notNull": true,
1082
+ "autoincrement": false
1083
+ }
1084
+ },
1085
+ "indexes": {
1086
+ "lesson_sections_lesson_idx": {
1087
+ "name": "lesson_sections_lesson_idx",
1088
+ "columns": [
1089
+ "lesson_id"
1090
+ ],
1091
+ "isUnique": false
1092
+ },
1093
+ "lesson_sections_artifact_idx": {
1094
+ "name": "lesson_sections_artifact_idx",
1095
+ "columns": [
1096
+ "artifact_id"
1097
+ ],
1098
+ "isUnique": true
1099
+ }
1100
+ },
1101
+ "foreignKeys": {
1102
+ "lesson_sections_lesson_id_lessons_id_fk": {
1103
+ "name": "lesson_sections_lesson_id_lessons_id_fk",
1104
+ "tableFrom": "lesson_sections",
1105
+ "tableTo": "lessons",
1106
+ "columnsFrom": [
1107
+ "lesson_id"
1108
+ ],
1109
+ "columnsTo": [
1110
+ "id"
1111
+ ],
1112
+ "onDelete": "cascade",
1113
+ "onUpdate": "no action"
1114
+ },
1115
+ "lesson_sections_artifact_id_artifacts_id_fk": {
1116
+ "name": "lesson_sections_artifact_id_artifacts_id_fk",
1117
+ "tableFrom": "lesson_sections",
1118
+ "tableTo": "artifacts",
1119
+ "columnsFrom": [
1120
+ "artifact_id"
1121
+ ],
1122
+ "columnsTo": [
1123
+ "id"
1124
+ ],
1125
+ "onDelete": "cascade",
1126
+ "onUpdate": "no action"
1127
+ }
1128
+ },
1129
+ "compositePrimaryKeys": {},
1130
+ "uniqueConstraints": {},
1131
+ "checkConstraints": {}
1132
+ },
1133
+ "lesson_versions": {
1134
+ "name": "lesson_versions",
1135
+ "columns": {
1136
+ "id": {
1137
+ "name": "id",
1138
+ "type": "text",
1139
+ "primaryKey": true,
1140
+ "notNull": true,
1141
+ "autoincrement": false
1142
+ },
1143
+ "lesson_id": {
1144
+ "name": "lesson_id",
1145
+ "type": "text",
1146
+ "primaryKey": false,
1147
+ "notNull": true,
1148
+ "autoincrement": false
1149
+ },
1150
+ "version": {
1151
+ "name": "version",
1152
+ "type": "integer",
1153
+ "primaryKey": false,
1154
+ "notNull": true,
1155
+ "autoincrement": false
1156
+ },
1157
+ "outline": {
1158
+ "name": "outline",
1159
+ "type": "text",
1160
+ "primaryKey": false,
1161
+ "notNull": true,
1162
+ "autoincrement": false
1163
+ },
1164
+ "section_ids": {
1165
+ "name": "section_ids",
1166
+ "type": "text",
1167
+ "primaryKey": false,
1168
+ "notNull": true,
1169
+ "autoincrement": false
1170
+ },
1171
+ "changed_section_ids": {
1172
+ "name": "changed_section_ids",
1173
+ "type": "text",
1174
+ "primaryKey": false,
1175
+ "notNull": true,
1176
+ "autoincrement": false,
1177
+ "default": "'[]'"
1178
+ },
1179
+ "reason": {
1180
+ "name": "reason",
1181
+ "type": "text",
1182
+ "primaryKey": false,
1183
+ "notNull": false,
1184
+ "autoincrement": false
1185
+ },
1186
+ "created_at": {
1187
+ "name": "created_at",
1188
+ "type": "integer",
1189
+ "primaryKey": false,
1190
+ "notNull": true,
1191
+ "autoincrement": false
1192
+ }
1193
+ },
1194
+ "indexes": {
1195
+ "lesson_versions_lesson_version_idx": {
1196
+ "name": "lesson_versions_lesson_version_idx",
1197
+ "columns": [
1198
+ "lesson_id",
1199
+ "version"
1200
+ ],
1201
+ "isUnique": true
1202
+ }
1203
+ },
1204
+ "foreignKeys": {
1205
+ "lesson_versions_lesson_id_lessons_id_fk": {
1206
+ "name": "lesson_versions_lesson_id_lessons_id_fk",
1207
+ "tableFrom": "lesson_versions",
1208
+ "tableTo": "lessons",
1209
+ "columnsFrom": [
1210
+ "lesson_id"
1211
+ ],
1212
+ "columnsTo": [
1213
+ "id"
1214
+ ],
1215
+ "onDelete": "cascade",
1216
+ "onUpdate": "no action"
1217
+ }
1218
+ },
1219
+ "compositePrimaryKeys": {},
1220
+ "uniqueConstraints": {},
1221
+ "checkConstraints": {}
1222
+ },
1223
+ "lessons": {
1224
+ "name": "lessons",
1225
+ "columns": {
1226
+ "id": {
1227
+ "name": "id",
1228
+ "type": "text",
1229
+ "primaryKey": true,
1230
+ "notNull": true,
1231
+ "autoincrement": false
1232
+ },
1233
+ "course_id": {
1234
+ "name": "course_id",
1235
+ "type": "text",
1236
+ "primaryKey": false,
1237
+ "notNull": true,
1238
+ "autoincrement": false
1239
+ },
1240
+ "topic_id": {
1241
+ "name": "topic_id",
1242
+ "type": "text",
1243
+ "primaryKey": false,
1244
+ "notNull": true,
1245
+ "autoincrement": false
1246
+ },
1247
+ "topic_title": {
1248
+ "name": "topic_title",
1249
+ "type": "text",
1250
+ "primaryKey": false,
1251
+ "notNull": true,
1252
+ "autoincrement": false
1253
+ },
1254
+ "position": {
1255
+ "name": "position",
1256
+ "type": "integer",
1257
+ "primaryKey": false,
1258
+ "notNull": true,
1259
+ "autoincrement": false
1260
+ },
1261
+ "session_id": {
1262
+ "name": "session_id",
1263
+ "type": "text",
1264
+ "primaryKey": false,
1265
+ "notNull": true,
1266
+ "autoincrement": false
1267
+ },
1268
+ "status": {
1269
+ "name": "status",
1270
+ "type": "text",
1271
+ "primaryKey": false,
1272
+ "notNull": true,
1273
+ "autoincrement": false
1274
+ },
1275
+ "error": {
1276
+ "name": "error",
1277
+ "type": "text",
1278
+ "primaryKey": false,
1279
+ "notNull": false,
1280
+ "autoincrement": false
1281
+ },
1282
+ "error_action": {
1283
+ "name": "error_action",
1284
+ "type": "text",
1285
+ "primaryKey": false,
1286
+ "notNull": false,
1287
+ "autoincrement": false
1288
+ },
1289
+ "created_at": {
1290
+ "name": "created_at",
1291
+ "type": "integer",
1292
+ "primaryKey": false,
1293
+ "notNull": true,
1294
+ "autoincrement": false
1295
+ },
1296
+ "finished_at": {
1297
+ "name": "finished_at",
1298
+ "type": "integer",
1299
+ "primaryKey": false,
1300
+ "notNull": false,
1301
+ "autoincrement": false
1302
+ }
1303
+ },
1304
+ "indexes": {
1305
+ "lessons_course_topic_idx": {
1306
+ "name": "lessons_course_topic_idx",
1307
+ "columns": [
1308
+ "course_id",
1309
+ "topic_id"
1310
+ ],
1311
+ "isUnique": true
1312
+ },
1313
+ "lessons_session_idx": {
1314
+ "name": "lessons_session_idx",
1315
+ "columns": [
1316
+ "session_id"
1317
+ ],
1318
+ "isUnique": true
1319
+ }
1320
+ },
1321
+ "foreignKeys": {
1322
+ "lessons_course_id_courses_id_fk": {
1323
+ "name": "lessons_course_id_courses_id_fk",
1324
+ "tableFrom": "lessons",
1325
+ "tableTo": "courses",
1326
+ "columnsFrom": [
1327
+ "course_id"
1328
+ ],
1329
+ "columnsTo": [
1330
+ "id"
1331
+ ],
1332
+ "onDelete": "cascade",
1333
+ "onUpdate": "no action"
1334
+ },
1335
+ "lessons_session_id_sessions_id_fk": {
1336
+ "name": "lessons_session_id_sessions_id_fk",
1337
+ "tableFrom": "lessons",
1338
+ "tableTo": "sessions",
1339
+ "columnsFrom": [
1340
+ "session_id"
1341
+ ],
1342
+ "columnsTo": [
1343
+ "id"
1344
+ ],
1345
+ "onDelete": "cascade",
1346
+ "onUpdate": "no action"
1347
+ }
1348
+ },
1349
+ "compositePrimaryKeys": {},
1350
+ "uniqueConstraints": {},
1351
+ "checkConstraints": {}
1352
+ },
1353
+ "memories": {
1354
+ "name": "memories",
1355
+ "columns": {
1356
+ "id": {
1357
+ "name": "id",
1358
+ "type": "text",
1359
+ "primaryKey": true,
1360
+ "notNull": true,
1361
+ "autoincrement": false
1362
+ },
1363
+ "kind": {
1364
+ "name": "kind",
1365
+ "type": "text",
1366
+ "primaryKey": false,
1367
+ "notNull": true,
1368
+ "autoincrement": false
1369
+ },
1370
+ "text": {
1371
+ "name": "text",
1372
+ "type": "text",
1373
+ "primaryKey": false,
1374
+ "notNull": true,
1375
+ "autoincrement": false
1376
+ },
1377
+ "concept": {
1378
+ "name": "concept",
1379
+ "type": "text",
1380
+ "primaryKey": false,
1381
+ "notNull": false,
1382
+ "autoincrement": false
1383
+ },
1384
+ "basis": {
1385
+ "name": "basis",
1386
+ "type": "text",
1387
+ "primaryKey": false,
1388
+ "notNull": true,
1389
+ "autoincrement": false
1390
+ },
1391
+ "attempt_id": {
1392
+ "name": "attempt_id",
1393
+ "type": "text",
1394
+ "primaryKey": false,
1395
+ "notNull": false,
1396
+ "autoincrement": false
1397
+ },
1398
+ "session_id": {
1399
+ "name": "session_id",
1400
+ "type": "text",
1401
+ "primaryKey": false,
1402
+ "notNull": false,
1403
+ "autoincrement": false
1404
+ },
1405
+ "run_id": {
1406
+ "name": "run_id",
1407
+ "type": "text",
1408
+ "primaryKey": false,
1409
+ "notNull": false,
1410
+ "autoincrement": false
1411
+ },
1412
+ "status": {
1413
+ "name": "status",
1414
+ "type": "text",
1415
+ "primaryKey": false,
1416
+ "notNull": true,
1417
+ "autoincrement": false
1418
+ },
1419
+ "replaces_id": {
1420
+ "name": "replaces_id",
1421
+ "type": "text",
1422
+ "primaryKey": false,
1423
+ "notNull": false,
1424
+ "autoincrement": false
1425
+ },
1426
+ "note_id": {
1427
+ "name": "note_id",
1428
+ "type": "text",
1429
+ "primaryKey": false,
1430
+ "notNull": false,
1431
+ "autoincrement": false
1432
+ },
1433
+ "created_at": {
1434
+ "name": "created_at",
1435
+ "type": "integer",
1436
+ "primaryKey": false,
1437
+ "notNull": true,
1438
+ "autoincrement": false
1439
+ },
1440
+ "edited_at": {
1441
+ "name": "edited_at",
1442
+ "type": "integer",
1443
+ "primaryKey": false,
1444
+ "notNull": false,
1445
+ "autoincrement": false
1446
+ }
1447
+ },
1448
+ "indexes": {
1449
+ "memories_status_idx": {
1450
+ "name": "memories_status_idx",
1451
+ "columns": [
1452
+ "status",
1453
+ "created_at"
1454
+ ],
1455
+ "isUnique": false
1456
+ },
1457
+ "memories_run_idx": {
1458
+ "name": "memories_run_idx",
1459
+ "columns": [
1460
+ "run_id"
1461
+ ],
1462
+ "isUnique": false
1463
+ },
1464
+ "memories_note_idx": {
1465
+ "name": "memories_note_idx",
1466
+ "columns": [
1467
+ "note_id"
1468
+ ],
1469
+ "isUnique": false
1470
+ }
1471
+ },
1472
+ "foreignKeys": {
1473
+ "memories_attempt_id_attempts_id_fk": {
1474
+ "name": "memories_attempt_id_attempts_id_fk",
1475
+ "tableFrom": "memories",
1476
+ "tableTo": "attempts",
1477
+ "columnsFrom": [
1478
+ "attempt_id"
1479
+ ],
1480
+ "columnsTo": [
1481
+ "id"
1482
+ ],
1483
+ "onDelete": "set null",
1484
+ "onUpdate": "no action"
1485
+ },
1486
+ "memories_session_id_sessions_id_fk": {
1487
+ "name": "memories_session_id_sessions_id_fk",
1488
+ "tableFrom": "memories",
1489
+ "tableTo": "sessions",
1490
+ "columnsFrom": [
1491
+ "session_id"
1492
+ ],
1493
+ "columnsTo": [
1494
+ "id"
1495
+ ],
1496
+ "onDelete": "set null",
1497
+ "onUpdate": "no action"
1498
+ },
1499
+ "memories_run_id_runs_id_fk": {
1500
+ "name": "memories_run_id_runs_id_fk",
1501
+ "tableFrom": "memories",
1502
+ "tableTo": "runs",
1503
+ "columnsFrom": [
1504
+ "run_id"
1505
+ ],
1506
+ "columnsTo": [
1507
+ "id"
1508
+ ],
1509
+ "onDelete": "set null",
1510
+ "onUpdate": "no action"
1511
+ },
1512
+ "memories_note_id_notes_id_fk": {
1513
+ "name": "memories_note_id_notes_id_fk",
1514
+ "tableFrom": "memories",
1515
+ "tableTo": "notes",
1516
+ "columnsFrom": [
1517
+ "note_id"
1518
+ ],
1519
+ "columnsTo": [
1520
+ "id"
1521
+ ],
1522
+ "onDelete": "cascade",
1523
+ "onUpdate": "no action"
1524
+ }
1525
+ },
1526
+ "compositePrimaryKeys": {},
1527
+ "uniqueConstraints": {},
1528
+ "checkConstraints": {}
1529
+ },
1530
+ "memory_sources": {
1531
+ "name": "memory_sources",
1532
+ "columns": {
1533
+ "memory_id": {
1534
+ "name": "memory_id",
1535
+ "type": "text",
1536
+ "primaryKey": false,
1537
+ "notNull": true,
1538
+ "autoincrement": false
1539
+ },
1540
+ "note_id": {
1541
+ "name": "note_id",
1542
+ "type": "text",
1543
+ "primaryKey": false,
1544
+ "notNull": true,
1545
+ "autoincrement": false
1546
+ },
1547
+ "text": {
1548
+ "name": "text",
1549
+ "type": "text",
1550
+ "primaryKey": false,
1551
+ "notNull": true,
1552
+ "autoincrement": false
1553
+ }
1554
+ },
1555
+ "indexes": {
1556
+ "memory_sources_note_idx": {
1557
+ "name": "memory_sources_note_idx",
1558
+ "columns": [
1559
+ "note_id"
1560
+ ],
1561
+ "isUnique": false
1562
+ }
1563
+ },
1564
+ "foreignKeys": {
1565
+ "memory_sources_memory_id_memories_id_fk": {
1566
+ "name": "memory_sources_memory_id_memories_id_fk",
1567
+ "tableFrom": "memory_sources",
1568
+ "tableTo": "memories",
1569
+ "columnsFrom": [
1570
+ "memory_id"
1571
+ ],
1572
+ "columnsTo": [
1573
+ "id"
1574
+ ],
1575
+ "onDelete": "cascade",
1576
+ "onUpdate": "no action"
1577
+ },
1578
+ "memory_sources_note_id_notes_id_fk": {
1579
+ "name": "memory_sources_note_id_notes_id_fk",
1580
+ "tableFrom": "memory_sources",
1581
+ "tableTo": "notes",
1582
+ "columnsFrom": [
1583
+ "note_id"
1584
+ ],
1585
+ "columnsTo": [
1586
+ "id"
1587
+ ],
1588
+ "onDelete": "cascade",
1589
+ "onUpdate": "no action"
1590
+ }
1591
+ },
1592
+ "compositePrimaryKeys": {
1593
+ "memory_sources_memory_id_note_id_pk": {
1594
+ "columns": [
1595
+ "memory_id",
1596
+ "note_id"
1597
+ ],
1598
+ "name": "memory_sources_memory_id_note_id_pk"
1599
+ }
1600
+ },
1601
+ "uniqueConstraints": {},
1602
+ "checkConstraints": {}
1603
+ },
1604
+ "messages": {
1605
+ "name": "messages",
1606
+ "columns": {
1607
+ "id": {
1608
+ "name": "id",
1609
+ "type": "text",
1610
+ "primaryKey": true,
1611
+ "notNull": true,
1612
+ "autoincrement": false
1613
+ },
1614
+ "session_id": {
1615
+ "name": "session_id",
1616
+ "type": "text",
1617
+ "primaryKey": false,
1618
+ "notNull": true,
1619
+ "autoincrement": false
1620
+ },
1621
+ "seq": {
1622
+ "name": "seq",
1623
+ "type": "integer",
1624
+ "primaryKey": false,
1625
+ "notNull": true,
1626
+ "autoincrement": false
1627
+ },
1628
+ "role": {
1629
+ "name": "role",
1630
+ "type": "text",
1631
+ "primaryKey": false,
1632
+ "notNull": true,
1633
+ "autoincrement": false
1634
+ },
1635
+ "parts": {
1636
+ "name": "parts",
1637
+ "type": "text",
1638
+ "primaryKey": false,
1639
+ "notNull": true,
1640
+ "autoincrement": false
1641
+ },
1642
+ "created_at": {
1643
+ "name": "created_at",
1644
+ "type": "integer",
1645
+ "primaryKey": false,
1646
+ "notNull": true,
1647
+ "autoincrement": false
1648
+ }
1649
+ },
1650
+ "indexes": {
1651
+ "messages_session_seq_idx": {
1652
+ "name": "messages_session_seq_idx",
1653
+ "columns": [
1654
+ "session_id",
1655
+ "seq"
1656
+ ],
1657
+ "isUnique": true
1658
+ }
1659
+ },
1660
+ "foreignKeys": {
1661
+ "messages_session_id_sessions_id_fk": {
1662
+ "name": "messages_session_id_sessions_id_fk",
1663
+ "tableFrom": "messages",
1664
+ "tableTo": "sessions",
1665
+ "columnsFrom": [
1666
+ "session_id"
1667
+ ],
1668
+ "columnsTo": [
1669
+ "id"
1670
+ ],
1671
+ "onDelete": "cascade",
1672
+ "onUpdate": "no action"
1673
+ }
1674
+ },
1675
+ "compositePrimaryKeys": {},
1676
+ "uniqueConstraints": {},
1677
+ "checkConstraints": {}
1678
+ },
1679
+ "note_aliases": {
1680
+ "name": "note_aliases",
1681
+ "columns": {
1682
+ "note_id": {
1683
+ "name": "note_id",
1684
+ "type": "text",
1685
+ "primaryKey": false,
1686
+ "notNull": true,
1687
+ "autoincrement": false
1688
+ },
1689
+ "alias_key": {
1690
+ "name": "alias_key",
1691
+ "type": "text",
1692
+ "primaryKey": false,
1693
+ "notNull": true,
1694
+ "autoincrement": false
1695
+ }
1696
+ },
1697
+ "indexes": {
1698
+ "note_aliases_alias_idx": {
1699
+ "name": "note_aliases_alias_idx",
1700
+ "columns": [
1701
+ "alias_key",
1702
+ "note_id"
1703
+ ],
1704
+ "isUnique": false
1705
+ }
1706
+ },
1707
+ "foreignKeys": {
1708
+ "note_aliases_note_id_notes_id_fk": {
1709
+ "name": "note_aliases_note_id_notes_id_fk",
1710
+ "tableFrom": "note_aliases",
1711
+ "tableTo": "notes",
1712
+ "columnsFrom": [
1713
+ "note_id"
1714
+ ],
1715
+ "columnsTo": [
1716
+ "id"
1717
+ ],
1718
+ "onDelete": "cascade",
1719
+ "onUpdate": "no action"
1720
+ }
1721
+ },
1722
+ "compositePrimaryKeys": {
1723
+ "note_aliases_note_id_alias_key_pk": {
1724
+ "columns": [
1725
+ "note_id",
1726
+ "alias_key"
1727
+ ],
1728
+ "name": "note_aliases_note_id_alias_key_pk"
1729
+ }
1730
+ },
1731
+ "uniqueConstraints": {},
1732
+ "checkConstraints": {}
1733
+ },
1734
+ "note_chunks": {
1735
+ "name": "note_chunks",
1736
+ "columns": {
1737
+ "id": {
1738
+ "name": "id",
1739
+ "type": "integer",
1740
+ "primaryKey": true,
1741
+ "notNull": true,
1742
+ "autoincrement": true
1743
+ },
1744
+ "note_id": {
1745
+ "name": "note_id",
1746
+ "type": "text",
1747
+ "primaryKey": false,
1748
+ "notNull": true,
1749
+ "autoincrement": false
1750
+ },
1751
+ "seq": {
1752
+ "name": "seq",
1753
+ "type": "integer",
1754
+ "primaryKey": false,
1755
+ "notNull": true,
1756
+ "autoincrement": false
1757
+ },
1758
+ "heading": {
1759
+ "name": "heading",
1760
+ "type": "text",
1761
+ "primaryKey": false,
1762
+ "notNull": false,
1763
+ "autoincrement": false
1764
+ },
1765
+ "text": {
1766
+ "name": "text",
1767
+ "type": "text",
1768
+ "primaryKey": false,
1769
+ "notNull": true,
1770
+ "autoincrement": false
1771
+ }
1772
+ },
1773
+ "indexes": {
1774
+ "note_chunks_note_seq_idx": {
1775
+ "name": "note_chunks_note_seq_idx",
1776
+ "columns": [
1777
+ "note_id",
1778
+ "seq"
1779
+ ],
1780
+ "isUnique": true
1781
+ }
1782
+ },
1783
+ "foreignKeys": {
1784
+ "note_chunks_note_id_notes_id_fk": {
1785
+ "name": "note_chunks_note_id_notes_id_fk",
1786
+ "tableFrom": "note_chunks",
1787
+ "tableTo": "notes",
1788
+ "columnsFrom": [
1789
+ "note_id"
1790
+ ],
1791
+ "columnsTo": [
1792
+ "id"
1793
+ ],
1794
+ "onDelete": "cascade",
1795
+ "onUpdate": "no action"
1796
+ }
1797
+ },
1798
+ "compositePrimaryKeys": {},
1799
+ "uniqueConstraints": {},
1800
+ "checkConstraints": {}
1801
+ },
1802
+ "note_links": {
1803
+ "name": "note_links",
1804
+ "columns": {
1805
+ "note_id": {
1806
+ "name": "note_id",
1807
+ "type": "text",
1808
+ "primaryKey": false,
1809
+ "notNull": true,
1810
+ "autoincrement": false
1811
+ },
1812
+ "target": {
1813
+ "name": "target",
1814
+ "type": "text",
1815
+ "primaryKey": false,
1816
+ "notNull": true,
1817
+ "autoincrement": false
1818
+ },
1819
+ "target_key": {
1820
+ "name": "target_key",
1821
+ "type": "text",
1822
+ "primaryKey": false,
1823
+ "notNull": true,
1824
+ "autoincrement": false,
1825
+ "default": "''"
1826
+ },
1827
+ "kind": {
1828
+ "name": "kind",
1829
+ "type": "text",
1830
+ "primaryKey": false,
1831
+ "notNull": true,
1832
+ "autoincrement": false
1833
+ }
1834
+ },
1835
+ "indexes": {
1836
+ "note_links_target_key_idx": {
1837
+ "name": "note_links_target_key_idx",
1838
+ "columns": [
1839
+ "target_key"
1840
+ ],
1841
+ "isUnique": false
1842
+ }
1843
+ },
1844
+ "foreignKeys": {
1845
+ "note_links_note_id_notes_id_fk": {
1846
+ "name": "note_links_note_id_notes_id_fk",
1847
+ "tableFrom": "note_links",
1848
+ "tableTo": "notes",
1849
+ "columnsFrom": [
1850
+ "note_id"
1851
+ ],
1852
+ "columnsTo": [
1853
+ "id"
1854
+ ],
1855
+ "onDelete": "cascade",
1856
+ "onUpdate": "no action"
1857
+ }
1858
+ },
1859
+ "compositePrimaryKeys": {
1860
+ "note_links_note_id_target_kind_pk": {
1861
+ "columns": [
1862
+ "note_id",
1863
+ "target",
1864
+ "kind"
1865
+ ],
1866
+ "name": "note_links_note_id_target_kind_pk"
1867
+ }
1868
+ },
1869
+ "uniqueConstraints": {},
1870
+ "checkConstraints": {}
1871
+ },
1872
+ "note_tags": {
1873
+ "name": "note_tags",
1874
+ "columns": {
1875
+ "note_id": {
1876
+ "name": "note_id",
1877
+ "type": "text",
1878
+ "primaryKey": false,
1879
+ "notNull": true,
1880
+ "autoincrement": false
1881
+ },
1882
+ "tag": {
1883
+ "name": "tag",
1884
+ "type": "text",
1885
+ "primaryKey": false,
1886
+ "notNull": true,
1887
+ "autoincrement": false
1888
+ }
1889
+ },
1890
+ "indexes": {
1891
+ "note_tags_tag_idx": {
1892
+ "name": "note_tags_tag_idx",
1893
+ "columns": [
1894
+ "tag"
1895
+ ],
1896
+ "isUnique": false
1897
+ }
1898
+ },
1899
+ "foreignKeys": {
1900
+ "note_tags_note_id_notes_id_fk": {
1901
+ "name": "note_tags_note_id_notes_id_fk",
1902
+ "tableFrom": "note_tags",
1903
+ "tableTo": "notes",
1904
+ "columnsFrom": [
1905
+ "note_id"
1906
+ ],
1907
+ "columnsTo": [
1908
+ "id"
1909
+ ],
1910
+ "onDelete": "cascade",
1911
+ "onUpdate": "no action"
1912
+ }
1913
+ },
1914
+ "compositePrimaryKeys": {
1915
+ "note_tags_note_id_tag_pk": {
1916
+ "columns": [
1917
+ "note_id",
1918
+ "tag"
1919
+ ],
1920
+ "name": "note_tags_note_id_tag_pk"
1921
+ }
1922
+ },
1923
+ "uniqueConstraints": {},
1924
+ "checkConstraints": {}
1925
+ },
1926
+ "notes": {
1927
+ "name": "notes",
1928
+ "columns": {
1929
+ "id": {
1930
+ "name": "id",
1931
+ "type": "text",
1932
+ "primaryKey": true,
1933
+ "notNull": true,
1934
+ "autoincrement": false
1935
+ },
1936
+ "import_id": {
1937
+ "name": "import_id",
1938
+ "type": "text",
1939
+ "primaryKey": false,
1940
+ "notNull": true,
1941
+ "autoincrement": false
1942
+ },
1943
+ "path": {
1944
+ "name": "path",
1945
+ "type": "text",
1946
+ "primaryKey": false,
1947
+ "notNull": true,
1948
+ "autoincrement": false
1949
+ },
1950
+ "title": {
1951
+ "name": "title",
1952
+ "type": "text",
1953
+ "primaryKey": false,
1954
+ "notNull": true,
1955
+ "autoincrement": false
1956
+ },
1957
+ "title_key": {
1958
+ "name": "title_key",
1959
+ "type": "text",
1960
+ "primaryKey": false,
1961
+ "notNull": true,
1962
+ "autoincrement": false
1963
+ },
1964
+ "aliases": {
1965
+ "name": "aliases",
1966
+ "type": "text",
1967
+ "primaryKey": false,
1968
+ "notNull": true,
1969
+ "autoincrement": false
1970
+ },
1971
+ "body": {
1972
+ "name": "body",
1973
+ "type": "text",
1974
+ "primaryKey": false,
1975
+ "notNull": true,
1976
+ "autoincrement": false
1977
+ },
1978
+ "hash": {
1979
+ "name": "hash",
1980
+ "type": "text",
1981
+ "primaryKey": false,
1982
+ "notNull": true,
1983
+ "autoincrement": false
1984
+ },
1985
+ "distilled_hash": {
1986
+ "name": "distilled_hash",
1987
+ "type": "text",
1988
+ "primaryKey": false,
1989
+ "notNull": false,
1990
+ "autoincrement": false
1991
+ },
1992
+ "created_at": {
1993
+ "name": "created_at",
1994
+ "type": "integer",
1995
+ "primaryKey": false,
1996
+ "notNull": true,
1997
+ "autoincrement": false
1998
+ },
1999
+ "updated_at": {
2000
+ "name": "updated_at",
2001
+ "type": "integer",
2002
+ "primaryKey": false,
2003
+ "notNull": true,
2004
+ "autoincrement": false
2005
+ }
2006
+ },
2007
+ "indexes": {
2008
+ "notes_import_path_idx": {
2009
+ "name": "notes_import_path_idx",
2010
+ "columns": [
2011
+ "import_id",
2012
+ "path"
2013
+ ],
2014
+ "isUnique": true
2015
+ },
2016
+ "notes_import_title_idx": {
2017
+ "name": "notes_import_title_idx",
2018
+ "columns": [
2019
+ "import_id",
2020
+ "title_key"
2021
+ ],
2022
+ "isUnique": false
2023
+ }
2024
+ },
2025
+ "foreignKeys": {
2026
+ "notes_import_id_vault_imports_id_fk": {
2027
+ "name": "notes_import_id_vault_imports_id_fk",
2028
+ "tableFrom": "notes",
2029
+ "tableTo": "vault_imports",
2030
+ "columnsFrom": [
2031
+ "import_id"
2032
+ ],
2033
+ "columnsTo": [
2034
+ "id"
2035
+ ],
2036
+ "onDelete": "cascade",
2037
+ "onUpdate": "no action"
2038
+ }
2039
+ },
2040
+ "compositePrimaryKeys": {},
2041
+ "uniqueConstraints": {},
2042
+ "checkConstraints": {}
2043
+ },
2044
+ "runs": {
2045
+ "name": "runs",
2046
+ "columns": {
2047
+ "id": {
2048
+ "name": "id",
2049
+ "type": "text",
2050
+ "primaryKey": true,
2051
+ "notNull": true,
2052
+ "autoincrement": false
2053
+ },
2054
+ "session_id": {
2055
+ "name": "session_id",
2056
+ "type": "text",
2057
+ "primaryKey": false,
2058
+ "notNull": true,
2059
+ "autoincrement": false
2060
+ },
2061
+ "user_message_id": {
2062
+ "name": "user_message_id",
2063
+ "type": "text",
2064
+ "primaryKey": false,
2065
+ "notNull": true,
2066
+ "autoincrement": false
2067
+ },
2068
+ "continuation_of": {
2069
+ "name": "continuation_of",
2070
+ "type": "text",
2071
+ "primaryKey": false,
2072
+ "notNull": false,
2073
+ "autoincrement": false
2074
+ },
2075
+ "assistant_message_id": {
2076
+ "name": "assistant_message_id",
2077
+ "type": "text",
2078
+ "primaryKey": false,
2079
+ "notNull": false,
2080
+ "autoincrement": false
2081
+ },
2082
+ "status": {
2083
+ "name": "status",
2084
+ "type": "text",
2085
+ "primaryKey": false,
2086
+ "notNull": true,
2087
+ "autoincrement": false
2088
+ },
2089
+ "model": {
2090
+ "name": "model",
2091
+ "type": "text",
2092
+ "primaryKey": false,
2093
+ "notNull": false,
2094
+ "autoincrement": false
2095
+ },
2096
+ "effort": {
2097
+ "name": "effort",
2098
+ "type": "text",
2099
+ "primaryKey": false,
2100
+ "notNull": false,
2101
+ "autoincrement": false
2102
+ },
2103
+ "endpoint": {
2104
+ "name": "endpoint",
2105
+ "type": "text",
2106
+ "primaryKey": false,
2107
+ "notNull": false,
2108
+ "autoincrement": false
2109
+ },
2110
+ "error": {
2111
+ "name": "error",
2112
+ "type": "text",
2113
+ "primaryKey": false,
2114
+ "notNull": false,
2115
+ "autoincrement": false
2116
+ },
2117
+ "started_at": {
2118
+ "name": "started_at",
2119
+ "type": "integer",
2120
+ "primaryKey": false,
2121
+ "notNull": true,
2122
+ "autoincrement": false
2123
+ },
2124
+ "ended_at": {
2125
+ "name": "ended_at",
2126
+ "type": "integer",
2127
+ "primaryKey": false,
2128
+ "notNull": false,
2129
+ "autoincrement": false
2130
+ }
2131
+ },
2132
+ "indexes": {
2133
+ "runs_continuation_once_idx": {
2134
+ "name": "runs_continuation_once_idx",
2135
+ "columns": [
2136
+ "continuation_of"
2137
+ ],
2138
+ "isUnique": true
2139
+ },
2140
+ "runs_session_idx": {
2141
+ "name": "runs_session_idx",
2142
+ "columns": [
2143
+ "session_id",
2144
+ "started_at"
2145
+ ],
2146
+ "isUnique": false
2147
+ },
2148
+ "runs_one_running_per_session_idx": {
2149
+ "name": "runs_one_running_per_session_idx",
2150
+ "columns": [
2151
+ "session_id"
2152
+ ],
2153
+ "isUnique": true,
2154
+ "where": "\"runs\".\"status\" = 'running'"
2155
+ }
2156
+ },
2157
+ "foreignKeys": {
2158
+ "runs_session_id_sessions_id_fk": {
2159
+ "name": "runs_session_id_sessions_id_fk",
2160
+ "tableFrom": "runs",
2161
+ "tableTo": "sessions",
2162
+ "columnsFrom": [
2163
+ "session_id"
2164
+ ],
2165
+ "columnsTo": [
2166
+ "id"
2167
+ ],
2168
+ "onDelete": "cascade",
2169
+ "onUpdate": "no action"
2170
+ },
2171
+ "runs_user_message_id_messages_id_fk": {
2172
+ "name": "runs_user_message_id_messages_id_fk",
2173
+ "tableFrom": "runs",
2174
+ "tableTo": "messages",
2175
+ "columnsFrom": [
2176
+ "user_message_id"
2177
+ ],
2178
+ "columnsTo": [
2179
+ "id"
2180
+ ],
2181
+ "onDelete": "cascade",
2182
+ "onUpdate": "no action"
2183
+ },
2184
+ "runs_assistant_message_id_messages_id_fk": {
2185
+ "name": "runs_assistant_message_id_messages_id_fk",
2186
+ "tableFrom": "runs",
2187
+ "tableTo": "messages",
2188
+ "columnsFrom": [
2189
+ "assistant_message_id"
2190
+ ],
2191
+ "columnsTo": [
2192
+ "id"
2193
+ ],
2194
+ "onDelete": "set null",
2195
+ "onUpdate": "no action"
2196
+ }
2197
+ },
2198
+ "compositePrimaryKeys": {},
2199
+ "uniqueConstraints": {},
2200
+ "checkConstraints": {}
2201
+ },
2202
+ "sessions": {
2203
+ "name": "sessions",
2204
+ "columns": {
2205
+ "id": {
2206
+ "name": "id",
2207
+ "type": "text",
2208
+ "primaryKey": true,
2209
+ "notNull": true,
2210
+ "autoincrement": false
2211
+ },
2212
+ "title": {
2213
+ "name": "title",
2214
+ "type": "text",
2215
+ "primaryKey": false,
2216
+ "notNull": true,
2217
+ "autoincrement": false
2218
+ },
2219
+ "title_set_by_learner": {
2220
+ "name": "title_set_by_learner",
2221
+ "type": "integer",
2222
+ "primaryKey": false,
2223
+ "notNull": true,
2224
+ "autoincrement": false,
2225
+ "default": false
2226
+ },
2227
+ "created_at": {
2228
+ "name": "created_at",
2229
+ "type": "integer",
2230
+ "primaryKey": false,
2231
+ "notNull": true,
2232
+ "autoincrement": false
2233
+ },
2234
+ "updated_at": {
2235
+ "name": "updated_at",
2236
+ "type": "integer",
2237
+ "primaryKey": false,
2238
+ "notNull": true,
2239
+ "autoincrement": false
2240
+ }
2241
+ },
2242
+ "indexes": {},
2243
+ "foreignKeys": {},
2244
+ "compositePrimaryKeys": {},
2245
+ "uniqueConstraints": {},
2246
+ "checkConstraints": {}
2247
+ },
2248
+ "settings": {
2249
+ "name": "settings",
2250
+ "columns": {
2251
+ "key": {
2252
+ "name": "key",
2253
+ "type": "text",
2254
+ "primaryKey": true,
2255
+ "notNull": true,
2256
+ "autoincrement": false
2257
+ },
2258
+ "value": {
2259
+ "name": "value",
2260
+ "type": "text",
2261
+ "primaryKey": false,
2262
+ "notNull": true,
2263
+ "autoincrement": false
2264
+ },
2265
+ "updated_at": {
2266
+ "name": "updated_at",
2267
+ "type": "integer",
2268
+ "primaryKey": false,
2269
+ "notNull": true,
2270
+ "autoincrement": false
2271
+ }
2272
+ },
2273
+ "indexes": {},
2274
+ "foreignKeys": {},
2275
+ "compositePrimaryKeys": {},
2276
+ "uniqueConstraints": {},
2277
+ "checkConstraints": {}
2278
+ },
2279
+ "syllabus_versions": {
2280
+ "name": "syllabus_versions",
2281
+ "columns": {
2282
+ "id": {
2283
+ "name": "id",
2284
+ "type": "text",
2285
+ "primaryKey": true,
2286
+ "notNull": true,
2287
+ "autoincrement": false
2288
+ },
2289
+ "course_id": {
2290
+ "name": "course_id",
2291
+ "type": "text",
2292
+ "primaryKey": false,
2293
+ "notNull": true,
2294
+ "autoincrement": false
2295
+ },
2296
+ "version": {
2297
+ "name": "version",
2298
+ "type": "integer",
2299
+ "primaryKey": false,
2300
+ "notNull": true,
2301
+ "autoincrement": false
2302
+ },
2303
+ "topics": {
2304
+ "name": "topics",
2305
+ "type": "text",
2306
+ "primaryKey": false,
2307
+ "notNull": true,
2308
+ "autoincrement": false
2309
+ },
2310
+ "known": {
2311
+ "name": "known",
2312
+ "type": "text",
2313
+ "primaryKey": false,
2314
+ "notNull": true,
2315
+ "autoincrement": false
2316
+ },
2317
+ "source": {
2318
+ "name": "source",
2319
+ "type": "text",
2320
+ "primaryKey": false,
2321
+ "notNull": true,
2322
+ "autoincrement": false,
2323
+ "default": "'interview'"
2324
+ },
2325
+ "trigger_lesson_id": {
2326
+ "name": "trigger_lesson_id",
2327
+ "type": "text",
2328
+ "primaryKey": false,
2329
+ "notNull": false,
2330
+ "autoincrement": false
2331
+ },
2332
+ "reason": {
2333
+ "name": "reason",
2334
+ "type": "text",
2335
+ "primaryKey": false,
2336
+ "notNull": false,
2337
+ "autoincrement": false
2338
+ },
2339
+ "changed_topic_ids": {
2340
+ "name": "changed_topic_ids",
2341
+ "type": "text",
2342
+ "primaryKey": false,
2343
+ "notNull": true,
2344
+ "autoincrement": false,
2345
+ "default": "'[]'"
2346
+ },
2347
+ "run_id": {
2348
+ "name": "run_id",
2349
+ "type": "text",
2350
+ "primaryKey": false,
2351
+ "notNull": false,
2352
+ "autoincrement": false
2353
+ },
2354
+ "created_at": {
2355
+ "name": "created_at",
2356
+ "type": "integer",
2357
+ "primaryKey": false,
2358
+ "notNull": true,
2359
+ "autoincrement": false
2360
+ }
2361
+ },
2362
+ "indexes": {
2363
+ "syllabus_versions_course_version_idx": {
2364
+ "name": "syllabus_versions_course_version_idx",
2365
+ "columns": [
2366
+ "course_id",
2367
+ "version"
2368
+ ],
2369
+ "isUnique": true
2370
+ }
2371
+ },
2372
+ "foreignKeys": {
2373
+ "syllabus_versions_course_id_courses_id_fk": {
2374
+ "name": "syllabus_versions_course_id_courses_id_fk",
2375
+ "tableFrom": "syllabus_versions",
2376
+ "tableTo": "courses",
2377
+ "columnsFrom": [
2378
+ "course_id"
2379
+ ],
2380
+ "columnsTo": [
2381
+ "id"
2382
+ ],
2383
+ "onDelete": "cascade",
2384
+ "onUpdate": "no action"
2385
+ },
2386
+ "syllabus_versions_run_id_runs_id_fk": {
2387
+ "name": "syllabus_versions_run_id_runs_id_fk",
2388
+ "tableFrom": "syllabus_versions",
2389
+ "tableTo": "runs",
2390
+ "columnsFrom": [
2391
+ "run_id"
2392
+ ],
2393
+ "columnsTo": [
2394
+ "id"
2395
+ ],
2396
+ "onDelete": "set null",
2397
+ "onUpdate": "no action"
2398
+ }
2399
+ },
2400
+ "compositePrimaryKeys": {},
2401
+ "uniqueConstraints": {},
2402
+ "checkConstraints": {}
2403
+ },
2404
+ "usage_records": {
2405
+ "name": "usage_records",
2406
+ "columns": {
2407
+ "id": {
2408
+ "name": "id",
2409
+ "type": "text",
2410
+ "primaryKey": true,
2411
+ "notNull": true,
2412
+ "autoincrement": false
2413
+ },
2414
+ "kind": {
2415
+ "name": "kind",
2416
+ "type": "text",
2417
+ "primaryKey": false,
2418
+ "notNull": true,
2419
+ "autoincrement": false
2420
+ },
2421
+ "status": {
2422
+ "name": "status",
2423
+ "type": "text",
2424
+ "primaryKey": false,
2425
+ "notNull": true,
2426
+ "autoincrement": false
2427
+ },
2428
+ "session_id": {
2429
+ "name": "session_id",
2430
+ "type": "text",
2431
+ "primaryKey": false,
2432
+ "notNull": false,
2433
+ "autoincrement": false
2434
+ },
2435
+ "run_id": {
2436
+ "name": "run_id",
2437
+ "type": "text",
2438
+ "primaryKey": false,
2439
+ "notNull": false,
2440
+ "autoincrement": false
2441
+ },
2442
+ "seq": {
2443
+ "name": "seq",
2444
+ "type": "integer",
2445
+ "primaryKey": false,
2446
+ "notNull": true,
2447
+ "autoincrement": false
2448
+ },
2449
+ "provider": {
2450
+ "name": "provider",
2451
+ "type": "text",
2452
+ "primaryKey": false,
2453
+ "notNull": true,
2454
+ "autoincrement": false
2455
+ },
2456
+ "provider_label": {
2457
+ "name": "provider_label",
2458
+ "type": "text",
2459
+ "primaryKey": false,
2460
+ "notNull": true,
2461
+ "autoincrement": false
2462
+ },
2463
+ "model": {
2464
+ "name": "model",
2465
+ "type": "text",
2466
+ "primaryKey": false,
2467
+ "notNull": true,
2468
+ "autoincrement": false
2469
+ },
2470
+ "model_label": {
2471
+ "name": "model_label",
2472
+ "type": "text",
2473
+ "primaryKey": false,
2474
+ "notNull": false,
2475
+ "autoincrement": false
2476
+ },
2477
+ "effort": {
2478
+ "name": "effort",
2479
+ "type": "text",
2480
+ "primaryKey": false,
2481
+ "notNull": false,
2482
+ "autoincrement": false
2483
+ },
2484
+ "billing": {
2485
+ "name": "billing",
2486
+ "type": "text",
2487
+ "primaryKey": false,
2488
+ "notNull": true,
2489
+ "autoincrement": false
2490
+ },
2491
+ "input_tokens": {
2492
+ "name": "input_tokens",
2493
+ "type": "integer",
2494
+ "primaryKey": false,
2495
+ "notNull": false,
2496
+ "autoincrement": false
2497
+ },
2498
+ "input_no_cache_tokens": {
2499
+ "name": "input_no_cache_tokens",
2500
+ "type": "integer",
2501
+ "primaryKey": false,
2502
+ "notNull": false,
2503
+ "autoincrement": false
2504
+ },
2505
+ "input_cache_read_tokens": {
2506
+ "name": "input_cache_read_tokens",
2507
+ "type": "integer",
2508
+ "primaryKey": false,
2509
+ "notNull": false,
2510
+ "autoincrement": false
2511
+ },
2512
+ "input_cache_write_tokens": {
2513
+ "name": "input_cache_write_tokens",
2514
+ "type": "integer",
2515
+ "primaryKey": false,
2516
+ "notNull": false,
2517
+ "autoincrement": false
2518
+ },
2519
+ "output_tokens": {
2520
+ "name": "output_tokens",
2521
+ "type": "integer",
2522
+ "primaryKey": false,
2523
+ "notNull": false,
2524
+ "autoincrement": false
2525
+ },
2526
+ "output_reasoning_tokens": {
2527
+ "name": "output_reasoning_tokens",
2528
+ "type": "integer",
2529
+ "primaryKey": false,
2530
+ "notNull": false,
2531
+ "autoincrement": false
2532
+ },
2533
+ "reported_cost": {
2534
+ "name": "reported_cost",
2535
+ "type": "real",
2536
+ "primaryKey": false,
2537
+ "notNull": false,
2538
+ "autoincrement": false
2539
+ },
2540
+ "price": {
2541
+ "name": "price",
2542
+ "type": "text",
2543
+ "primaryKey": false,
2544
+ "notNull": false,
2545
+ "autoincrement": false
2546
+ },
2547
+ "estimated_cost": {
2548
+ "name": "estimated_cost",
2549
+ "type": "real",
2550
+ "primaryKey": false,
2551
+ "notNull": false,
2552
+ "autoincrement": false
2553
+ },
2554
+ "started_at": {
2555
+ "name": "started_at",
2556
+ "type": "integer",
2557
+ "primaryKey": false,
2558
+ "notNull": true,
2559
+ "autoincrement": false
2560
+ },
2561
+ "ended_at": {
2562
+ "name": "ended_at",
2563
+ "type": "integer",
2564
+ "primaryKey": false,
2565
+ "notNull": true,
2566
+ "autoincrement": false
2567
+ }
2568
+ },
2569
+ "indexes": {
2570
+ "usage_records_started_idx": {
2571
+ "name": "usage_records_started_idx",
2572
+ "columns": [
2573
+ "started_at"
2574
+ ],
2575
+ "isUnique": false
2576
+ },
2577
+ "usage_records_run_idx": {
2578
+ "name": "usage_records_run_idx",
2579
+ "columns": [
2580
+ "run_id"
2581
+ ],
2582
+ "isUnique": false
2583
+ }
2584
+ },
2585
+ "foreignKeys": {},
2586
+ "compositePrimaryKeys": {},
2587
+ "uniqueConstraints": {},
2588
+ "checkConstraints": {}
2589
+ },
2590
+ "vault_imports": {
2591
+ "name": "vault_imports",
2592
+ "columns": {
2593
+ "id": {
2594
+ "name": "id",
2595
+ "type": "text",
2596
+ "primaryKey": true,
2597
+ "notNull": true,
2598
+ "autoincrement": false
2599
+ },
2600
+ "name": {
2601
+ "name": "name",
2602
+ "type": "text",
2603
+ "primaryKey": false,
2604
+ "notNull": true,
2605
+ "autoincrement": false
2606
+ },
2607
+ "source": {
2608
+ "name": "source",
2609
+ "type": "text",
2610
+ "primaryKey": false,
2611
+ "notNull": true,
2612
+ "autoincrement": false
2613
+ },
2614
+ "created_at": {
2615
+ "name": "created_at",
2616
+ "type": "integer",
2617
+ "primaryKey": false,
2618
+ "notNull": true,
2619
+ "autoincrement": false
2620
+ },
2621
+ "updated_at": {
2622
+ "name": "updated_at",
2623
+ "type": "integer",
2624
+ "primaryKey": false,
2625
+ "notNull": true,
2626
+ "autoincrement": false
2627
+ }
2628
+ },
2629
+ "indexes": {
2630
+ "vault_imports_name_idx": {
2631
+ "name": "vault_imports_name_idx",
2632
+ "columns": [
2633
+ "name"
2634
+ ],
2635
+ "isUnique": true
2636
+ }
2637
+ },
2638
+ "foreignKeys": {},
2639
+ "compositePrimaryKeys": {},
2640
+ "uniqueConstraints": {},
2641
+ "checkConstraints": {}
2642
+ }
2643
+ },
2644
+ "views": {},
2645
+ "enums": {},
2646
+ "_meta": {
2647
+ "schemas": {},
2648
+ "tables": {},
2649
+ "columns": {}
2650
+ },
2651
+ "internal": {
2652
+ "indexes": {}
2653
+ }
2654
+ }