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