@verdict-ai/db 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/auth.d.ts +12 -2
  2. package/dist/auth.js +5 -4
  3. package/dist/auth.js.map +1 -1
  4. package/dist/control.d.ts +58 -0
  5. package/dist/control.js +305 -0
  6. package/dist/control.js.map +1 -0
  7. package/dist/d1.d.ts +1201 -0
  8. package/dist/dialects.d.ts +7 -0
  9. package/dist/dialects.js +17 -0
  10. package/dist/dialects.js.map +1 -1
  11. package/dist/documents.d.ts +2 -0
  12. package/dist/postgres.d.ts +2454 -268
  13. package/dist/queries.d.ts +2 -0
  14. package/dist/queries.js +4 -0
  15. package/dist/queries.js.map +1 -1
  16. package/dist/schema/control.d.ts +71 -0
  17. package/dist/schema/control.js +29 -0
  18. package/dist/schema/control.js.map +1 -0
  19. package/dist/schema/pg.d.ts +2453 -262
  20. package/dist/schema/pg.js +44 -2
  21. package/dist/schema/pg.js.map +1 -1
  22. package/dist/schema/sqlite.d.ts +2680 -273
  23. package/dist/schema/sqlite.js +44 -2
  24. package/dist/schema/sqlite.js.map +1 -1
  25. package/dist/store.d.ts +12 -4
  26. package/dist/store.js +77 -6
  27. package/dist/store.js.map +1 -1
  28. package/drizzle/0002_publications.sql +20 -0
  29. package/drizzle/0003_publishers.sql +9 -0
  30. package/drizzle/0004_control_plane.sql +75 -0
  31. package/drizzle/meta/0002_snapshot.json +659 -0
  32. package/drizzle/meta/0003_snapshot.json +712 -0
  33. package/drizzle/meta/0004_snapshot.json +1191 -0
  34. package/drizzle/meta/_journal.json +21 -0
  35. package/drizzle/pg/0001_publications.sql +20 -0
  36. package/drizzle/pg/0002_publishers.sql +9 -0
  37. package/drizzle/pg/0003_control_plane.sql +75 -0
  38. package/drizzle/pg/meta/0001_snapshot.json +769 -0
  39. package/drizzle/pg/meta/0002_snapshot.json +828 -0
  40. package/drizzle/pg/meta/0003_snapshot.json +1381 -0
  41. package/drizzle/pg/meta/_journal.json +21 -0
  42. package/package.json +4 -3
@@ -0,0 +1,1381 @@
1
+ {
2
+ "id": "66a903d9-3b65-42ba-b24c-0d78b598cb40",
3
+ "prevId": "13f66327-a6bc-483b-945e-3a7c47b0d446",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.api_keys": {
8
+ "name": "api_keys",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "tenant_id": {
18
+ "name": "tenant_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "name": {
24
+ "name": "name",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "key_hash": {
30
+ "name": "key_hash",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "prefix": {
36
+ "name": "prefix",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "created_at": {
42
+ "name": "created_at",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "last_used_at": {
48
+ "name": "last_used_at",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "revoked_at": {
54
+ "name": "revoked_at",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ }
59
+ },
60
+ "indexes": {
61
+ "api_keys_hash": {
62
+ "name": "api_keys_hash",
63
+ "columns": [
64
+ {
65
+ "expression": "key_hash",
66
+ "isExpression": false,
67
+ "asc": true,
68
+ "nulls": "last"
69
+ }
70
+ ],
71
+ "isUnique": true,
72
+ "concurrently": false,
73
+ "method": "btree",
74
+ "with": {}
75
+ },
76
+ "api_keys_tenant": {
77
+ "name": "api_keys_tenant",
78
+ "columns": [
79
+ {
80
+ "expression": "tenant_id",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ }
85
+ ],
86
+ "isUnique": false,
87
+ "concurrently": false,
88
+ "method": "btree",
89
+ "with": {}
90
+ }
91
+ },
92
+ "foreignKeys": {},
93
+ "compositePrimaryKeys": {},
94
+ "uniqueConstraints": {},
95
+ "policies": {},
96
+ "checkConstraints": {},
97
+ "isRLSEnabled": false
98
+ },
99
+ "public.comparison_reports": {
100
+ "name": "comparison_reports",
101
+ "schema": "",
102
+ "columns": {
103
+ "tenant_id": {
104
+ "name": "tenant_id",
105
+ "type": "text",
106
+ "primaryKey": false,
107
+ "notNull": true
108
+ },
109
+ "project": {
110
+ "name": "project",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true
114
+ },
115
+ "id": {
116
+ "name": "id",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": true
120
+ },
121
+ "rubric_name": {
122
+ "name": "rubric_name",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": true
126
+ },
127
+ "head_version_id": {
128
+ "name": "head_version_id",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true
132
+ },
133
+ "doc": {
134
+ "name": "doc",
135
+ "type": "jsonb",
136
+ "primaryKey": false,
137
+ "notNull": true
138
+ },
139
+ "reported_at": {
140
+ "name": "reported_at",
141
+ "type": "text",
142
+ "primaryKey": false,
143
+ "notNull": true
144
+ }
145
+ },
146
+ "indexes": {
147
+ "comparison_reports_reported": {
148
+ "name": "comparison_reports_reported",
149
+ "columns": [
150
+ {
151
+ "expression": "tenant_id",
152
+ "isExpression": false,
153
+ "asc": true,
154
+ "nulls": "last"
155
+ },
156
+ {
157
+ "expression": "project",
158
+ "isExpression": false,
159
+ "asc": true,
160
+ "nulls": "last"
161
+ },
162
+ {
163
+ "expression": "reported_at",
164
+ "isExpression": false,
165
+ "asc": true,
166
+ "nulls": "last"
167
+ }
168
+ ],
169
+ "isUnique": false,
170
+ "concurrently": false,
171
+ "method": "btree",
172
+ "with": {}
173
+ }
174
+ },
175
+ "foreignKeys": {},
176
+ "compositePrimaryKeys": {
177
+ "comparison_reports_tenant_id_project_id_pk": {
178
+ "name": "comparison_reports_tenant_id_project_id_pk",
179
+ "columns": [
180
+ "tenant_id",
181
+ "project",
182
+ "id"
183
+ ]
184
+ }
185
+ },
186
+ "uniqueConstraints": {},
187
+ "policies": {},
188
+ "checkConstraints": {},
189
+ "isRLSEnabled": false
190
+ },
191
+ "public.environments": {
192
+ "name": "environments",
193
+ "schema": "",
194
+ "columns": {
195
+ "tenant_id": {
196
+ "name": "tenant_id",
197
+ "type": "text",
198
+ "primaryKey": false,
199
+ "notNull": true
200
+ },
201
+ "project": {
202
+ "name": "project",
203
+ "type": "text",
204
+ "primaryKey": false,
205
+ "notNull": true
206
+ },
207
+ "name": {
208
+ "name": "name",
209
+ "type": "text",
210
+ "primaryKey": false,
211
+ "notNull": true
212
+ },
213
+ "created_at": {
214
+ "name": "created_at",
215
+ "type": "text",
216
+ "primaryKey": false,
217
+ "notNull": true
218
+ }
219
+ },
220
+ "indexes": {},
221
+ "foreignKeys": {},
222
+ "compositePrimaryKeys": {
223
+ "environments_tenant_id_project_name_pk": {
224
+ "name": "environments_tenant_id_project_name_pk",
225
+ "columns": [
226
+ "tenant_id",
227
+ "project",
228
+ "name"
229
+ ]
230
+ }
231
+ },
232
+ "uniqueConstraints": {},
233
+ "policies": {},
234
+ "checkConstraints": {},
235
+ "isRLSEnabled": false
236
+ },
237
+ "public.evaluations": {
238
+ "name": "evaluations",
239
+ "schema": "",
240
+ "columns": {
241
+ "id": {
242
+ "name": "id",
243
+ "type": "text",
244
+ "primaryKey": true,
245
+ "notNull": true
246
+ },
247
+ "tenant_id": {
248
+ "name": "tenant_id",
249
+ "type": "text",
250
+ "primaryKey": false,
251
+ "notNull": false
252
+ },
253
+ "rubric_id": {
254
+ "name": "rubric_id",
255
+ "type": "text",
256
+ "primaryKey": false,
257
+ "notNull": false
258
+ },
259
+ "rubric_name": {
260
+ "name": "rubric_name",
261
+ "type": "text",
262
+ "primaryKey": false,
263
+ "notNull": true
264
+ },
265
+ "subject_name": {
266
+ "name": "subject_name",
267
+ "type": "text",
268
+ "primaryKey": false,
269
+ "notNull": false
270
+ },
271
+ "status": {
272
+ "name": "status",
273
+ "type": "text",
274
+ "primaryKey": false,
275
+ "notNull": true
276
+ },
277
+ "score": {
278
+ "name": "score",
279
+ "type": "double precision",
280
+ "primaryKey": false,
281
+ "notNull": false
282
+ },
283
+ "grade": {
284
+ "name": "grade",
285
+ "type": "text",
286
+ "primaryKey": false,
287
+ "notNull": false
288
+ },
289
+ "passed": {
290
+ "name": "passed",
291
+ "type": "boolean",
292
+ "primaryKey": false,
293
+ "notNull": false
294
+ },
295
+ "pending_human": {
296
+ "name": "pending_human",
297
+ "type": "integer",
298
+ "primaryKey": false,
299
+ "notNull": true,
300
+ "default": 0
301
+ },
302
+ "decision_calls": {
303
+ "name": "decision_calls",
304
+ "type": "integer",
305
+ "primaryKey": false,
306
+ "notNull": true,
307
+ "default": 0
308
+ },
309
+ "llm_calls": {
310
+ "name": "llm_calls",
311
+ "type": "integer",
312
+ "primaryKey": false,
313
+ "notNull": true,
314
+ "default": 0
315
+ },
316
+ "input_tokens": {
317
+ "name": "input_tokens",
318
+ "type": "integer",
319
+ "primaryKey": false,
320
+ "notNull": true,
321
+ "default": 0
322
+ },
323
+ "duration_ms": {
324
+ "name": "duration_ms",
325
+ "type": "integer",
326
+ "primaryKey": false,
327
+ "notNull": true,
328
+ "default": 0
329
+ },
330
+ "doc": {
331
+ "name": "doc",
332
+ "type": "jsonb",
333
+ "primaryKey": false,
334
+ "notNull": true
335
+ },
336
+ "created_at": {
337
+ "name": "created_at",
338
+ "type": "text",
339
+ "primaryKey": false,
340
+ "notNull": true
341
+ },
342
+ "updated_at": {
343
+ "name": "updated_at",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": true
347
+ }
348
+ },
349
+ "indexes": {
350
+ "evaluations_tenant_created": {
351
+ "name": "evaluations_tenant_created",
352
+ "columns": [
353
+ {
354
+ "expression": "tenant_id",
355
+ "isExpression": false,
356
+ "asc": true,
357
+ "nulls": "last"
358
+ },
359
+ {
360
+ "expression": "created_at",
361
+ "isExpression": false,
362
+ "asc": true,
363
+ "nulls": "last"
364
+ }
365
+ ],
366
+ "isUnique": false,
367
+ "concurrently": false,
368
+ "method": "btree",
369
+ "with": {}
370
+ },
371
+ "evaluations_rubric_created": {
372
+ "name": "evaluations_rubric_created",
373
+ "columns": [
374
+ {
375
+ "expression": "rubric_id",
376
+ "isExpression": false,
377
+ "asc": true,
378
+ "nulls": "last"
379
+ },
380
+ {
381
+ "expression": "created_at",
382
+ "isExpression": false,
383
+ "asc": true,
384
+ "nulls": "last"
385
+ }
386
+ ],
387
+ "isUnique": false,
388
+ "concurrently": false,
389
+ "method": "btree",
390
+ "with": {}
391
+ },
392
+ "evaluations_tenant_status": {
393
+ "name": "evaluations_tenant_status",
394
+ "columns": [
395
+ {
396
+ "expression": "tenant_id",
397
+ "isExpression": false,
398
+ "asc": true,
399
+ "nulls": "last"
400
+ },
401
+ {
402
+ "expression": "status",
403
+ "isExpression": false,
404
+ "asc": true,
405
+ "nulls": "last"
406
+ }
407
+ ],
408
+ "isUnique": false,
409
+ "concurrently": false,
410
+ "method": "btree",
411
+ "with": {}
412
+ }
413
+ },
414
+ "foreignKeys": {},
415
+ "compositePrimaryKeys": {},
416
+ "uniqueConstraints": {},
417
+ "policies": {},
418
+ "checkConstraints": {},
419
+ "isRLSEnabled": false
420
+ },
421
+ "public.idempotency_keys": {
422
+ "name": "idempotency_keys",
423
+ "schema": "",
424
+ "columns": {
425
+ "tenant_id": {
426
+ "name": "tenant_id",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": false
430
+ },
431
+ "key": {
432
+ "name": "key",
433
+ "type": "text",
434
+ "primaryKey": false,
435
+ "notNull": true
436
+ },
437
+ "fingerprint": {
438
+ "name": "fingerprint",
439
+ "type": "text",
440
+ "primaryKey": false,
441
+ "notNull": true
442
+ },
443
+ "target_type": {
444
+ "name": "target_type",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": true
448
+ },
449
+ "target_id": {
450
+ "name": "target_id",
451
+ "type": "text",
452
+ "primaryKey": false,
453
+ "notNull": false
454
+ },
455
+ "target_ids": {
456
+ "name": "target_ids",
457
+ "type": "jsonb",
458
+ "primaryKey": false,
459
+ "notNull": false
460
+ },
461
+ "created_at": {
462
+ "name": "created_at",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": true
466
+ },
467
+ "expires_at": {
468
+ "name": "expires_at",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true
472
+ }
473
+ },
474
+ "indexes": {
475
+ "idempotency_keys_tenant_key": {
476
+ "name": "idempotency_keys_tenant_key",
477
+ "columns": [
478
+ {
479
+ "expression": "tenant_id",
480
+ "isExpression": false,
481
+ "asc": true,
482
+ "nulls": "last"
483
+ },
484
+ {
485
+ "expression": "key",
486
+ "isExpression": false,
487
+ "asc": true,
488
+ "nulls": "last"
489
+ }
490
+ ],
491
+ "isUnique": true,
492
+ "concurrently": false,
493
+ "method": "btree",
494
+ "with": {}
495
+ }
496
+ },
497
+ "foreignKeys": {},
498
+ "compositePrimaryKeys": {},
499
+ "uniqueConstraints": {},
500
+ "policies": {},
501
+ "checkConstraints": {},
502
+ "isRLSEnabled": false
503
+ },
504
+ "public.pointers": {
505
+ "name": "pointers",
506
+ "schema": "",
507
+ "columns": {
508
+ "tenant_id": {
509
+ "name": "tenant_id",
510
+ "type": "text",
511
+ "primaryKey": false,
512
+ "notNull": true
513
+ },
514
+ "project": {
515
+ "name": "project",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": true
519
+ },
520
+ "environment": {
521
+ "name": "environment",
522
+ "type": "text",
523
+ "primaryKey": false,
524
+ "notNull": true
525
+ },
526
+ "rubric_name": {
527
+ "name": "rubric_name",
528
+ "type": "text",
529
+ "primaryKey": false,
530
+ "notNull": true
531
+ },
532
+ "version_id": {
533
+ "name": "version_id",
534
+ "type": "text",
535
+ "primaryKey": false,
536
+ "notNull": true
537
+ },
538
+ "updated_at": {
539
+ "name": "updated_at",
540
+ "type": "text",
541
+ "primaryKey": false,
542
+ "notNull": true
543
+ }
544
+ },
545
+ "indexes": {
546
+ "pointers_version": {
547
+ "name": "pointers_version",
548
+ "columns": [
549
+ {
550
+ "expression": "tenant_id",
551
+ "isExpression": false,
552
+ "asc": true,
553
+ "nulls": "last"
554
+ },
555
+ {
556
+ "expression": "project",
557
+ "isExpression": false,
558
+ "asc": true,
559
+ "nulls": "last"
560
+ },
561
+ {
562
+ "expression": "rubric_name",
563
+ "isExpression": false,
564
+ "asc": true,
565
+ "nulls": "last"
566
+ },
567
+ {
568
+ "expression": "version_id",
569
+ "isExpression": false,
570
+ "asc": true,
571
+ "nulls": "last"
572
+ }
573
+ ],
574
+ "isUnique": false,
575
+ "concurrently": false,
576
+ "method": "btree",
577
+ "with": {}
578
+ }
579
+ },
580
+ "foreignKeys": {},
581
+ "compositePrimaryKeys": {
582
+ "pointers_tenant_id_project_environment_rubric_name_pk": {
583
+ "name": "pointers_tenant_id_project_environment_rubric_name_pk",
584
+ "columns": [
585
+ "tenant_id",
586
+ "project",
587
+ "environment",
588
+ "rubric_name"
589
+ ]
590
+ }
591
+ },
592
+ "uniqueConstraints": {},
593
+ "policies": {},
594
+ "checkConstraints": {},
595
+ "isRLSEnabled": false
596
+ },
597
+ "public.project_versions": {
598
+ "name": "project_versions",
599
+ "schema": "",
600
+ "columns": {
601
+ "tenant_id": {
602
+ "name": "tenant_id",
603
+ "type": "text",
604
+ "primaryKey": false,
605
+ "notNull": true
606
+ },
607
+ "project": {
608
+ "name": "project",
609
+ "type": "text",
610
+ "primaryKey": false,
611
+ "notNull": true
612
+ },
613
+ "rubric_name": {
614
+ "name": "rubric_name",
615
+ "type": "text",
616
+ "primaryKey": false,
617
+ "notNull": true
618
+ },
619
+ "version_id": {
620
+ "name": "version_id",
621
+ "type": "text",
622
+ "primaryKey": false,
623
+ "notNull": true
624
+ },
625
+ "doc": {
626
+ "name": "doc",
627
+ "type": "jsonb",
628
+ "primaryKey": false,
629
+ "notNull": true
630
+ },
631
+ "created_at": {
632
+ "name": "created_at",
633
+ "type": "text",
634
+ "primaryKey": false,
635
+ "notNull": true
636
+ }
637
+ },
638
+ "indexes": {
639
+ "project_versions_created": {
640
+ "name": "project_versions_created",
641
+ "columns": [
642
+ {
643
+ "expression": "tenant_id",
644
+ "isExpression": false,
645
+ "asc": true,
646
+ "nulls": "last"
647
+ },
648
+ {
649
+ "expression": "project",
650
+ "isExpression": false,
651
+ "asc": true,
652
+ "nulls": "last"
653
+ },
654
+ {
655
+ "expression": "created_at",
656
+ "isExpression": false,
657
+ "asc": true,
658
+ "nulls": "last"
659
+ }
660
+ ],
661
+ "isUnique": false,
662
+ "concurrently": false,
663
+ "method": "btree",
664
+ "with": {}
665
+ }
666
+ },
667
+ "foreignKeys": {},
668
+ "compositePrimaryKeys": {
669
+ "project_versions_tenant_id_project_rubric_name_version_id_pk": {
670
+ "name": "project_versions_tenant_id_project_rubric_name_version_id_pk",
671
+ "columns": [
672
+ "tenant_id",
673
+ "project",
674
+ "rubric_name",
675
+ "version_id"
676
+ ]
677
+ }
678
+ },
679
+ "uniqueConstraints": {},
680
+ "policies": {},
681
+ "checkConstraints": {},
682
+ "isRLSEnabled": false
683
+ },
684
+ "public.projects": {
685
+ "name": "projects",
686
+ "schema": "",
687
+ "columns": {
688
+ "tenant_id": {
689
+ "name": "tenant_id",
690
+ "type": "text",
691
+ "primaryKey": false,
692
+ "notNull": true
693
+ },
694
+ "name": {
695
+ "name": "name",
696
+ "type": "text",
697
+ "primaryKey": false,
698
+ "notNull": true
699
+ },
700
+ "created_at": {
701
+ "name": "created_at",
702
+ "type": "text",
703
+ "primaryKey": false,
704
+ "notNull": true
705
+ }
706
+ },
707
+ "indexes": {},
708
+ "foreignKeys": {},
709
+ "compositePrimaryKeys": {
710
+ "projects_tenant_id_name_pk": {
711
+ "name": "projects_tenant_id_name_pk",
712
+ "columns": [
713
+ "tenant_id",
714
+ "name"
715
+ ]
716
+ }
717
+ },
718
+ "uniqueConstraints": {},
719
+ "policies": {},
720
+ "checkConstraints": {},
721
+ "isRLSEnabled": false
722
+ },
723
+ "public.promotions": {
724
+ "name": "promotions",
725
+ "schema": "",
726
+ "columns": {
727
+ "tenant_id": {
728
+ "name": "tenant_id",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": true
732
+ },
733
+ "project": {
734
+ "name": "project",
735
+ "type": "text",
736
+ "primaryKey": false,
737
+ "notNull": true
738
+ },
739
+ "id": {
740
+ "name": "id",
741
+ "type": "text",
742
+ "primaryKey": false,
743
+ "notNull": true
744
+ },
745
+ "environment": {
746
+ "name": "environment",
747
+ "type": "text",
748
+ "primaryKey": false,
749
+ "notNull": true
750
+ },
751
+ "rubric_name": {
752
+ "name": "rubric_name",
753
+ "type": "text",
754
+ "primaryKey": false,
755
+ "notNull": true
756
+ },
757
+ "doc": {
758
+ "name": "doc",
759
+ "type": "jsonb",
760
+ "primaryKey": false,
761
+ "notNull": true
762
+ },
763
+ "created_at": {
764
+ "name": "created_at",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": true
768
+ }
769
+ },
770
+ "indexes": {
771
+ "promotions_created": {
772
+ "name": "promotions_created",
773
+ "columns": [
774
+ {
775
+ "expression": "tenant_id",
776
+ "isExpression": false,
777
+ "asc": true,
778
+ "nulls": "last"
779
+ },
780
+ {
781
+ "expression": "project",
782
+ "isExpression": false,
783
+ "asc": true,
784
+ "nulls": "last"
785
+ },
786
+ {
787
+ "expression": "created_at",
788
+ "isExpression": false,
789
+ "asc": true,
790
+ "nulls": "last"
791
+ }
792
+ ],
793
+ "isUnique": false,
794
+ "concurrently": false,
795
+ "method": "btree",
796
+ "with": {}
797
+ }
798
+ },
799
+ "foreignKeys": {},
800
+ "compositePrimaryKeys": {
801
+ "promotions_tenant_id_project_id_pk": {
802
+ "name": "promotions_tenant_id_project_id_pk",
803
+ "columns": [
804
+ "tenant_id",
805
+ "project",
806
+ "id"
807
+ ]
808
+ }
809
+ },
810
+ "uniqueConstraints": {},
811
+ "policies": {},
812
+ "checkConstraints": {},
813
+ "isRLSEnabled": false
814
+ },
815
+ "public.publications": {
816
+ "name": "publications",
817
+ "schema": "",
818
+ "columns": {
819
+ "id": {
820
+ "name": "id",
821
+ "type": "text",
822
+ "primaryKey": true,
823
+ "notNull": true
824
+ },
825
+ "tenant_id": {
826
+ "name": "tenant_id",
827
+ "type": "text",
828
+ "primaryKey": false,
829
+ "notNull": false
830
+ },
831
+ "owner": {
832
+ "name": "owner",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true
836
+ },
837
+ "slug": {
838
+ "name": "slug",
839
+ "type": "text",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "version_id": {
844
+ "name": "version_id",
845
+ "type": "text",
846
+ "primaryKey": false,
847
+ "notNull": true
848
+ },
849
+ "title": {
850
+ "name": "title",
851
+ "type": "text",
852
+ "primaryKey": false,
853
+ "notNull": true
854
+ },
855
+ "domain": {
856
+ "name": "domain",
857
+ "type": "text",
858
+ "primaryKey": false,
859
+ "notNull": false
860
+ },
861
+ "locale": {
862
+ "name": "locale",
863
+ "type": "text",
864
+ "primaryKey": false,
865
+ "notNull": false
866
+ },
867
+ "judgment_type": {
868
+ "name": "judgment_type",
869
+ "type": "text",
870
+ "primaryKey": false,
871
+ "notNull": true
872
+ },
873
+ "license": {
874
+ "name": "license",
875
+ "type": "text",
876
+ "primaryKey": false,
877
+ "notNull": true
878
+ },
879
+ "doc": {
880
+ "name": "doc",
881
+ "type": "jsonb",
882
+ "primaryKey": false,
883
+ "notNull": true
884
+ },
885
+ "created_at": {
886
+ "name": "created_at",
887
+ "type": "text",
888
+ "primaryKey": false,
889
+ "notNull": true
890
+ },
891
+ "withdrawn_at": {
892
+ "name": "withdrawn_at",
893
+ "type": "text",
894
+ "primaryKey": false,
895
+ "notNull": false
896
+ }
897
+ },
898
+ "indexes": {
899
+ "publications_owner_slug_version": {
900
+ "name": "publications_owner_slug_version",
901
+ "columns": [
902
+ {
903
+ "expression": "owner",
904
+ "isExpression": false,
905
+ "asc": true,
906
+ "nulls": "last"
907
+ },
908
+ {
909
+ "expression": "slug",
910
+ "isExpression": false,
911
+ "asc": true,
912
+ "nulls": "last"
913
+ },
914
+ {
915
+ "expression": "version_id",
916
+ "isExpression": false,
917
+ "asc": true,
918
+ "nulls": "last"
919
+ }
920
+ ],
921
+ "isUnique": true,
922
+ "concurrently": false,
923
+ "method": "btree",
924
+ "with": {}
925
+ },
926
+ "publications_created": {
927
+ "name": "publications_created",
928
+ "columns": [
929
+ {
930
+ "expression": "created_at",
931
+ "isExpression": false,
932
+ "asc": true,
933
+ "nulls": "last"
934
+ }
935
+ ],
936
+ "isUnique": false,
937
+ "concurrently": false,
938
+ "method": "btree",
939
+ "with": {}
940
+ },
941
+ "publications_version": {
942
+ "name": "publications_version",
943
+ "columns": [
944
+ {
945
+ "expression": "version_id",
946
+ "isExpression": false,
947
+ "asc": true,
948
+ "nulls": "last"
949
+ }
950
+ ],
951
+ "isUnique": false,
952
+ "concurrently": false,
953
+ "method": "btree",
954
+ "with": {}
955
+ },
956
+ "publications_tenant": {
957
+ "name": "publications_tenant",
958
+ "columns": [
959
+ {
960
+ "expression": "tenant_id",
961
+ "isExpression": false,
962
+ "asc": true,
963
+ "nulls": "last"
964
+ }
965
+ ],
966
+ "isUnique": false,
967
+ "concurrently": false,
968
+ "method": "btree",
969
+ "with": {}
970
+ }
971
+ },
972
+ "foreignKeys": {},
973
+ "compositePrimaryKeys": {},
974
+ "uniqueConstraints": {},
975
+ "policies": {},
976
+ "checkConstraints": {},
977
+ "isRLSEnabled": false
978
+ },
979
+ "public.publishers": {
980
+ "name": "publishers",
981
+ "schema": "",
982
+ "columns": {
983
+ "tenant_id": {
984
+ "name": "tenant_id",
985
+ "type": "text",
986
+ "primaryKey": true,
987
+ "notNull": true
988
+ },
989
+ "github_id": {
990
+ "name": "github_id",
991
+ "type": "integer",
992
+ "primaryKey": false,
993
+ "notNull": true
994
+ },
995
+ "login": {
996
+ "name": "login",
997
+ "type": "text",
998
+ "primaryKey": false,
999
+ "notNull": true
1000
+ },
1001
+ "created_at": {
1002
+ "name": "created_at",
1003
+ "type": "text",
1004
+ "primaryKey": false,
1005
+ "notNull": true
1006
+ },
1007
+ "updated_at": {
1008
+ "name": "updated_at",
1009
+ "type": "text",
1010
+ "primaryKey": false,
1011
+ "notNull": true
1012
+ }
1013
+ },
1014
+ "indexes": {
1015
+ "publishers_github_id": {
1016
+ "name": "publishers_github_id",
1017
+ "columns": [
1018
+ {
1019
+ "expression": "github_id",
1020
+ "isExpression": false,
1021
+ "asc": true,
1022
+ "nulls": "last"
1023
+ }
1024
+ ],
1025
+ "isUnique": true,
1026
+ "concurrently": false,
1027
+ "method": "btree",
1028
+ "with": {}
1029
+ }
1030
+ },
1031
+ "foreignKeys": {},
1032
+ "compositePrimaryKeys": {},
1033
+ "uniqueConstraints": {},
1034
+ "policies": {},
1035
+ "checkConstraints": {},
1036
+ "isRLSEnabled": false
1037
+ },
1038
+ "public.ratings": {
1039
+ "name": "ratings",
1040
+ "schema": "",
1041
+ "columns": {
1042
+ "id": {
1043
+ "name": "id",
1044
+ "type": "text",
1045
+ "primaryKey": true,
1046
+ "notNull": true
1047
+ },
1048
+ "evaluation_id": {
1049
+ "name": "evaluation_id",
1050
+ "type": "text",
1051
+ "primaryKey": false,
1052
+ "notNull": true
1053
+ },
1054
+ "tenant_id": {
1055
+ "name": "tenant_id",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": false
1059
+ },
1060
+ "rubric_id": {
1061
+ "name": "rubric_id",
1062
+ "type": "text",
1063
+ "primaryKey": false,
1064
+ "notNull": false
1065
+ },
1066
+ "criterion_id": {
1067
+ "name": "criterion_id",
1068
+ "type": "text",
1069
+ "primaryKey": false,
1070
+ "notNull": true
1071
+ },
1072
+ "rater_id": {
1073
+ "name": "rater_id",
1074
+ "type": "text",
1075
+ "primaryKey": false,
1076
+ "notNull": true
1077
+ },
1078
+ "judge_type": {
1079
+ "name": "judge_type",
1080
+ "type": "text",
1081
+ "primaryKey": false,
1082
+ "notNull": true
1083
+ },
1084
+ "status": {
1085
+ "name": "status",
1086
+ "type": "text",
1087
+ "primaryKey": false,
1088
+ "notNull": true
1089
+ },
1090
+ "score": {
1091
+ "name": "score",
1092
+ "type": "double precision",
1093
+ "primaryKey": false,
1094
+ "notNull": false
1095
+ },
1096
+ "normalized": {
1097
+ "name": "normalized",
1098
+ "type": "double precision",
1099
+ "primaryKey": false,
1100
+ "notNull": false
1101
+ },
1102
+ "confidence": {
1103
+ "name": "confidence",
1104
+ "type": "double precision",
1105
+ "primaryKey": false,
1106
+ "notNull": false
1107
+ },
1108
+ "model": {
1109
+ "name": "model",
1110
+ "type": "text",
1111
+ "primaryKey": false,
1112
+ "notNull": false
1113
+ },
1114
+ "created_at": {
1115
+ "name": "created_at",
1116
+ "type": "text",
1117
+ "primaryKey": false,
1118
+ "notNull": true
1119
+ }
1120
+ },
1121
+ "indexes": {
1122
+ "ratings_evaluation": {
1123
+ "name": "ratings_evaluation",
1124
+ "columns": [
1125
+ {
1126
+ "expression": "evaluation_id",
1127
+ "isExpression": false,
1128
+ "asc": true,
1129
+ "nulls": "last"
1130
+ }
1131
+ ],
1132
+ "isUnique": false,
1133
+ "concurrently": false,
1134
+ "method": "btree",
1135
+ "with": {}
1136
+ },
1137
+ "ratings_rubric_criterion": {
1138
+ "name": "ratings_rubric_criterion",
1139
+ "columns": [
1140
+ {
1141
+ "expression": "rubric_id",
1142
+ "isExpression": false,
1143
+ "asc": true,
1144
+ "nulls": "last"
1145
+ },
1146
+ {
1147
+ "expression": "criterion_id",
1148
+ "isExpression": false,
1149
+ "asc": true,
1150
+ "nulls": "last"
1151
+ }
1152
+ ],
1153
+ "isUnique": false,
1154
+ "concurrently": false,
1155
+ "method": "btree",
1156
+ "with": {}
1157
+ },
1158
+ "ratings_tenant_judge": {
1159
+ "name": "ratings_tenant_judge",
1160
+ "columns": [
1161
+ {
1162
+ "expression": "tenant_id",
1163
+ "isExpression": false,
1164
+ "asc": true,
1165
+ "nulls": "last"
1166
+ },
1167
+ {
1168
+ "expression": "judge_type",
1169
+ "isExpression": false,
1170
+ "asc": true,
1171
+ "nulls": "last"
1172
+ }
1173
+ ],
1174
+ "isUnique": false,
1175
+ "concurrently": false,
1176
+ "method": "btree",
1177
+ "with": {}
1178
+ }
1179
+ },
1180
+ "foreignKeys": {},
1181
+ "compositePrimaryKeys": {},
1182
+ "uniqueConstraints": {},
1183
+ "policies": {},
1184
+ "checkConstraints": {},
1185
+ "isRLSEnabled": false
1186
+ },
1187
+ "public.rubrics": {
1188
+ "name": "rubrics",
1189
+ "schema": "",
1190
+ "columns": {
1191
+ "id": {
1192
+ "name": "id",
1193
+ "type": "text",
1194
+ "primaryKey": true,
1195
+ "notNull": true
1196
+ },
1197
+ "tenant_id": {
1198
+ "name": "tenant_id",
1199
+ "type": "text",
1200
+ "primaryKey": false,
1201
+ "notNull": false
1202
+ },
1203
+ "name": {
1204
+ "name": "name",
1205
+ "type": "text",
1206
+ "primaryKey": false,
1207
+ "notNull": true
1208
+ },
1209
+ "version": {
1210
+ "name": "version",
1211
+ "type": "text",
1212
+ "primaryKey": false,
1213
+ "notNull": true,
1214
+ "default": "'1'"
1215
+ },
1216
+ "doc": {
1217
+ "name": "doc",
1218
+ "type": "jsonb",
1219
+ "primaryKey": false,
1220
+ "notNull": true
1221
+ },
1222
+ "created_at": {
1223
+ "name": "created_at",
1224
+ "type": "text",
1225
+ "primaryKey": false,
1226
+ "notNull": true
1227
+ },
1228
+ "updated_at": {
1229
+ "name": "updated_at",
1230
+ "type": "text",
1231
+ "primaryKey": false,
1232
+ "notNull": true
1233
+ }
1234
+ },
1235
+ "indexes": {
1236
+ "rubrics_tenant_created": {
1237
+ "name": "rubrics_tenant_created",
1238
+ "columns": [
1239
+ {
1240
+ "expression": "tenant_id",
1241
+ "isExpression": false,
1242
+ "asc": true,
1243
+ "nulls": "last"
1244
+ },
1245
+ {
1246
+ "expression": "created_at",
1247
+ "isExpression": false,
1248
+ "asc": true,
1249
+ "nulls": "last"
1250
+ }
1251
+ ],
1252
+ "isUnique": false,
1253
+ "concurrently": false,
1254
+ "method": "btree",
1255
+ "with": {}
1256
+ }
1257
+ },
1258
+ "foreignKeys": {},
1259
+ "compositePrimaryKeys": {},
1260
+ "uniqueConstraints": {},
1261
+ "policies": {},
1262
+ "checkConstraints": {},
1263
+ "isRLSEnabled": false
1264
+ },
1265
+ "public.run_reports": {
1266
+ "name": "run_reports",
1267
+ "schema": "",
1268
+ "columns": {
1269
+ "tenant_id": {
1270
+ "name": "tenant_id",
1271
+ "type": "text",
1272
+ "primaryKey": false,
1273
+ "notNull": true
1274
+ },
1275
+ "project": {
1276
+ "name": "project",
1277
+ "type": "text",
1278
+ "primaryKey": false,
1279
+ "notNull": true
1280
+ },
1281
+ "run_id": {
1282
+ "name": "run_id",
1283
+ "type": "text",
1284
+ "primaryKey": false,
1285
+ "notNull": true
1286
+ },
1287
+ "rubric_name": {
1288
+ "name": "rubric_name",
1289
+ "type": "text",
1290
+ "primaryKey": false,
1291
+ "notNull": true
1292
+ },
1293
+ "version_id": {
1294
+ "name": "version_id",
1295
+ "type": "text",
1296
+ "primaryKey": false,
1297
+ "notNull": true
1298
+ },
1299
+ "dataset_name": {
1300
+ "name": "dataset_name",
1301
+ "type": "text",
1302
+ "primaryKey": false,
1303
+ "notNull": false
1304
+ },
1305
+ "started_at": {
1306
+ "name": "started_at",
1307
+ "type": "text",
1308
+ "primaryKey": false,
1309
+ "notNull": true
1310
+ },
1311
+ "doc": {
1312
+ "name": "doc",
1313
+ "type": "jsonb",
1314
+ "primaryKey": false,
1315
+ "notNull": true
1316
+ },
1317
+ "reported_at": {
1318
+ "name": "reported_at",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true
1322
+ }
1323
+ },
1324
+ "indexes": {
1325
+ "run_reports_started": {
1326
+ "name": "run_reports_started",
1327
+ "columns": [
1328
+ {
1329
+ "expression": "tenant_id",
1330
+ "isExpression": false,
1331
+ "asc": true,
1332
+ "nulls": "last"
1333
+ },
1334
+ {
1335
+ "expression": "project",
1336
+ "isExpression": false,
1337
+ "asc": true,
1338
+ "nulls": "last"
1339
+ },
1340
+ {
1341
+ "expression": "started_at",
1342
+ "isExpression": false,
1343
+ "asc": true,
1344
+ "nulls": "last"
1345
+ }
1346
+ ],
1347
+ "isUnique": false,
1348
+ "concurrently": false,
1349
+ "method": "btree",
1350
+ "with": {}
1351
+ }
1352
+ },
1353
+ "foreignKeys": {},
1354
+ "compositePrimaryKeys": {
1355
+ "run_reports_tenant_id_project_run_id_pk": {
1356
+ "name": "run_reports_tenant_id_project_run_id_pk",
1357
+ "columns": [
1358
+ "tenant_id",
1359
+ "project",
1360
+ "run_id"
1361
+ ]
1362
+ }
1363
+ },
1364
+ "uniqueConstraints": {},
1365
+ "policies": {},
1366
+ "checkConstraints": {},
1367
+ "isRLSEnabled": false
1368
+ }
1369
+ },
1370
+ "enums": {},
1371
+ "schemas": {},
1372
+ "sequences": {},
1373
+ "roles": {},
1374
+ "policies": {},
1375
+ "views": {},
1376
+ "_meta": {
1377
+ "columns": {},
1378
+ "schemas": {},
1379
+ "tables": {}
1380
+ }
1381
+ }