@hyperfixation/db 0.1.0 → 0.1.1

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.
@@ -0,0 +1,2433 @@
1
+ {
2
+ "id": "203eedee-f7c1-4695-8de5-6ffdb609e49d",
3
+ "prevId": "3b241314-4135-4116-95b7-bfaaeaa1f8bc",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.hf_app_state": {
8
+ "name": "hf_app_state",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "integer",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": 1
17
+ },
18
+ "paused": {
19
+ "name": "paused",
20
+ "type": "boolean",
21
+ "primaryKey": false,
22
+ "notNull": true,
23
+ "default": false
24
+ },
25
+ "paused_by": {
26
+ "name": "paused_by",
27
+ "type": "text",
28
+ "primaryKey": false,
29
+ "notNull": false
30
+ },
31
+ "budget_usd": {
32
+ "name": "budget_usd",
33
+ "type": "numeric(12, 4)",
34
+ "primaryKey": false,
35
+ "notNull": true
36
+ },
37
+ "read_token_hash": {
38
+ "name": "read_token_hash",
39
+ "type": "text",
40
+ "primaryKey": false,
41
+ "notNull": false
42
+ },
43
+ "write_token_hash": {
44
+ "name": "write_token_hash",
45
+ "type": "text",
46
+ "primaryKey": false,
47
+ "notNull": false
48
+ },
49
+ "llm_mode": {
50
+ "name": "llm_mode",
51
+ "type": "text",
52
+ "primaryKey": false,
53
+ "notNull": false
54
+ }
55
+ },
56
+ "indexes": {},
57
+ "foreignKeys": {},
58
+ "compositePrimaryKeys": {},
59
+ "uniqueConstraints": {},
60
+ "policies": {},
61
+ "checkConstraints": {
62
+ "hf_app_state_singleton": {
63
+ "name": "hf_app_state_singleton",
64
+ "value": "\"hf_app_state\".\"id\" = 1"
65
+ }
66
+ },
67
+ "isRLSEnabled": false
68
+ },
69
+ "public.hf_audit": {
70
+ "name": "hf_audit",
71
+ "schema": "",
72
+ "columns": {
73
+ "id": {
74
+ "name": "id",
75
+ "type": "bigint",
76
+ "primaryKey": true,
77
+ "notNull": true,
78
+ "identity": {
79
+ "type": "always",
80
+ "name": "hf_audit_id_seq",
81
+ "schema": "public",
82
+ "increment": "1",
83
+ "startWith": "1",
84
+ "minValue": "1",
85
+ "maxValue": "9223372036854775807",
86
+ "cache": "1",
87
+ "cycle": false
88
+ }
89
+ },
90
+ "actor_id": {
91
+ "name": "actor_id",
92
+ "type": "text",
93
+ "primaryKey": false,
94
+ "notNull": false
95
+ },
96
+ "action": {
97
+ "name": "action",
98
+ "type": "text",
99
+ "primaryKey": false,
100
+ "notNull": true
101
+ },
102
+ "target_type": {
103
+ "name": "target_type",
104
+ "type": "text",
105
+ "primaryKey": false,
106
+ "notNull": false
107
+ },
108
+ "target_id": {
109
+ "name": "target_id",
110
+ "type": "text",
111
+ "primaryKey": false,
112
+ "notNull": false
113
+ },
114
+ "meta": {
115
+ "name": "meta",
116
+ "type": "jsonb",
117
+ "primaryKey": false,
118
+ "notNull": false
119
+ },
120
+ "at": {
121
+ "name": "at",
122
+ "type": "timestamp with time zone",
123
+ "primaryKey": false,
124
+ "notNull": true,
125
+ "default": "now()"
126
+ }
127
+ },
128
+ "indexes": {},
129
+ "foreignKeys": {},
130
+ "compositePrimaryKeys": {},
131
+ "uniqueConstraints": {},
132
+ "policies": {},
133
+ "checkConstraints": {},
134
+ "isRLSEnabled": false
135
+ },
136
+ "public.hf_approval": {
137
+ "name": "hf_approval",
138
+ "schema": "",
139
+ "columns": {
140
+ "id": {
141
+ "name": "id",
142
+ "type": "bigint",
143
+ "primaryKey": true,
144
+ "notNull": true,
145
+ "identity": {
146
+ "type": "always",
147
+ "name": "hf_approval_id_seq",
148
+ "schema": "public",
149
+ "increment": "1",
150
+ "startWith": "1",
151
+ "minValue": "1",
152
+ "maxValue": "9223372036854775807",
153
+ "cache": "1",
154
+ "cycle": false
155
+ }
156
+ },
157
+ "run_id": {
158
+ "name": "run_id",
159
+ "type": "text",
160
+ "primaryKey": false,
161
+ "notNull": true
162
+ },
163
+ "key": {
164
+ "name": "key",
165
+ "type": "text",
166
+ "primaryKey": false,
167
+ "notNull": true
168
+ },
169
+ "workflow_id": {
170
+ "name": "workflow_id",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": true
174
+ },
175
+ "type": {
176
+ "name": "type",
177
+ "type": "text",
178
+ "primaryKey": false,
179
+ "notNull": true
180
+ },
181
+ "record_type": {
182
+ "name": "record_type",
183
+ "type": "text",
184
+ "primaryKey": false,
185
+ "notNull": false
186
+ },
187
+ "record_id": {
188
+ "name": "record_id",
189
+ "type": "text",
190
+ "primaryKey": false,
191
+ "notNull": false
192
+ },
193
+ "draft": {
194
+ "name": "draft",
195
+ "type": "jsonb",
196
+ "primaryKey": false,
197
+ "notNull": false
198
+ },
199
+ "edited_draft": {
200
+ "name": "edited_draft",
201
+ "type": "jsonb",
202
+ "primaryKey": false,
203
+ "notNull": false
204
+ },
205
+ "status": {
206
+ "name": "status",
207
+ "type": "text",
208
+ "primaryKey": false,
209
+ "notNull": true
210
+ },
211
+ "assignee_id": {
212
+ "name": "assignee_id",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": false
216
+ },
217
+ "decided_by": {
218
+ "name": "decided_by",
219
+ "type": "text",
220
+ "primaryKey": false,
221
+ "notNull": false
222
+ },
223
+ "decided_at": {
224
+ "name": "decided_at",
225
+ "type": "timestamp with time zone",
226
+ "primaryKey": false,
227
+ "notNull": false
228
+ },
229
+ "decided_via": {
230
+ "name": "decided_via",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": false
234
+ },
235
+ "decision_key": {
236
+ "name": "decision_key",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": false
240
+ },
241
+ "resume_workflow_id": {
242
+ "name": "resume_workflow_id",
243
+ "type": "text",
244
+ "primaryKey": false,
245
+ "notNull": false
246
+ },
247
+ "notified_at": {
248
+ "name": "notified_at",
249
+ "type": "timestamp with time zone",
250
+ "primaryKey": false,
251
+ "notNull": false
252
+ },
253
+ "expires_at": {
254
+ "name": "expires_at",
255
+ "type": "timestamp with time zone",
256
+ "primaryKey": false,
257
+ "notNull": false
258
+ },
259
+ "batch_id": {
260
+ "name": "batch_id",
261
+ "type": "text",
262
+ "primaryKey": false,
263
+ "notNull": false
264
+ },
265
+ "created_at": {
266
+ "name": "created_at",
267
+ "type": "timestamp with time zone",
268
+ "primaryKey": false,
269
+ "notNull": true,
270
+ "default": "now()"
271
+ }
272
+ },
273
+ "indexes": {
274
+ "hf_approval_run_key_uq": {
275
+ "name": "hf_approval_run_key_uq",
276
+ "columns": [
277
+ {
278
+ "expression": "run_id",
279
+ "isExpression": false,
280
+ "asc": true,
281
+ "nulls": "last"
282
+ },
283
+ {
284
+ "expression": "key",
285
+ "isExpression": false,
286
+ "asc": true,
287
+ "nulls": "last"
288
+ }
289
+ ],
290
+ "isUnique": true,
291
+ "concurrently": false,
292
+ "method": "btree",
293
+ "with": {}
294
+ },
295
+ "hf_approval_status_idx": {
296
+ "name": "hf_approval_status_idx",
297
+ "columns": [
298
+ {
299
+ "expression": "status",
300
+ "isExpression": false,
301
+ "asc": true,
302
+ "nulls": "last"
303
+ },
304
+ {
305
+ "expression": "expires_at",
306
+ "isExpression": false,
307
+ "asc": true,
308
+ "nulls": "last"
309
+ }
310
+ ],
311
+ "isUnique": false,
312
+ "concurrently": false,
313
+ "method": "btree",
314
+ "with": {}
315
+ }
316
+ },
317
+ "foreignKeys": {},
318
+ "compositePrimaryKeys": {},
319
+ "uniqueConstraints": {},
320
+ "policies": {},
321
+ "checkConstraints": {},
322
+ "isRLSEnabled": false
323
+ },
324
+ "public.hf_account": {
325
+ "name": "hf_account",
326
+ "schema": "",
327
+ "columns": {
328
+ "id": {
329
+ "name": "id",
330
+ "type": "text",
331
+ "primaryKey": true,
332
+ "notNull": true
333
+ },
334
+ "account_id": {
335
+ "name": "account_id",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true
339
+ },
340
+ "provider_id": {
341
+ "name": "provider_id",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": true
345
+ },
346
+ "user_id": {
347
+ "name": "user_id",
348
+ "type": "text",
349
+ "primaryKey": false,
350
+ "notNull": true
351
+ },
352
+ "access_token": {
353
+ "name": "access_token",
354
+ "type": "text",
355
+ "primaryKey": false,
356
+ "notNull": false
357
+ },
358
+ "refresh_token": {
359
+ "name": "refresh_token",
360
+ "type": "text",
361
+ "primaryKey": false,
362
+ "notNull": false
363
+ },
364
+ "id_token": {
365
+ "name": "id_token",
366
+ "type": "text",
367
+ "primaryKey": false,
368
+ "notNull": false
369
+ },
370
+ "access_token_expires_at": {
371
+ "name": "access_token_expires_at",
372
+ "type": "timestamp with time zone",
373
+ "primaryKey": false,
374
+ "notNull": false
375
+ },
376
+ "refresh_token_expires_at": {
377
+ "name": "refresh_token_expires_at",
378
+ "type": "timestamp with time zone",
379
+ "primaryKey": false,
380
+ "notNull": false
381
+ },
382
+ "scope": {
383
+ "name": "scope",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": false
387
+ },
388
+ "password": {
389
+ "name": "password",
390
+ "type": "text",
391
+ "primaryKey": false,
392
+ "notNull": false
393
+ },
394
+ "created_at": {
395
+ "name": "created_at",
396
+ "type": "timestamp with time zone",
397
+ "primaryKey": false,
398
+ "notNull": true,
399
+ "default": "now()"
400
+ },
401
+ "updated_at": {
402
+ "name": "updated_at",
403
+ "type": "timestamp with time zone",
404
+ "primaryKey": false,
405
+ "notNull": true,
406
+ "default": "now()"
407
+ }
408
+ },
409
+ "indexes": {},
410
+ "foreignKeys": {
411
+ "hf_account_user_id_hf_user_id_fk": {
412
+ "name": "hf_account_user_id_hf_user_id_fk",
413
+ "tableFrom": "hf_account",
414
+ "tableTo": "hf_user",
415
+ "columnsFrom": [
416
+ "user_id"
417
+ ],
418
+ "columnsTo": [
419
+ "id"
420
+ ],
421
+ "onDelete": "cascade",
422
+ "onUpdate": "no action"
423
+ }
424
+ },
425
+ "compositePrimaryKeys": {},
426
+ "uniqueConstraints": {},
427
+ "policies": {},
428
+ "checkConstraints": {},
429
+ "isRLSEnabled": false
430
+ },
431
+ "public.hf_invitation": {
432
+ "name": "hf_invitation",
433
+ "schema": "",
434
+ "columns": {
435
+ "id": {
436
+ "name": "id",
437
+ "type": "text",
438
+ "primaryKey": true,
439
+ "notNull": true
440
+ },
441
+ "organization_id": {
442
+ "name": "organization_id",
443
+ "type": "text",
444
+ "primaryKey": false,
445
+ "notNull": true
446
+ },
447
+ "email": {
448
+ "name": "email",
449
+ "type": "text",
450
+ "primaryKey": false,
451
+ "notNull": true
452
+ },
453
+ "role": {
454
+ "name": "role",
455
+ "type": "text",
456
+ "primaryKey": false,
457
+ "notNull": false
458
+ },
459
+ "status": {
460
+ "name": "status",
461
+ "type": "text",
462
+ "primaryKey": false,
463
+ "notNull": true,
464
+ "default": "'pending'"
465
+ },
466
+ "expires_at": {
467
+ "name": "expires_at",
468
+ "type": "timestamp with time zone",
469
+ "primaryKey": false,
470
+ "notNull": true
471
+ },
472
+ "inviter_id": {
473
+ "name": "inviter_id",
474
+ "type": "text",
475
+ "primaryKey": false,
476
+ "notNull": true
477
+ },
478
+ "created_at": {
479
+ "name": "created_at",
480
+ "type": "timestamp with time zone",
481
+ "primaryKey": false,
482
+ "notNull": true,
483
+ "default": "now()"
484
+ }
485
+ },
486
+ "indexes": {},
487
+ "foreignKeys": {
488
+ "hf_invitation_organization_id_hf_organization_id_fk": {
489
+ "name": "hf_invitation_organization_id_hf_organization_id_fk",
490
+ "tableFrom": "hf_invitation",
491
+ "tableTo": "hf_organization",
492
+ "columnsFrom": [
493
+ "organization_id"
494
+ ],
495
+ "columnsTo": [
496
+ "id"
497
+ ],
498
+ "onDelete": "cascade",
499
+ "onUpdate": "no action"
500
+ },
501
+ "hf_invitation_inviter_id_hf_user_id_fk": {
502
+ "name": "hf_invitation_inviter_id_hf_user_id_fk",
503
+ "tableFrom": "hf_invitation",
504
+ "tableTo": "hf_user",
505
+ "columnsFrom": [
506
+ "inviter_id"
507
+ ],
508
+ "columnsTo": [
509
+ "id"
510
+ ],
511
+ "onDelete": "cascade",
512
+ "onUpdate": "no action"
513
+ }
514
+ },
515
+ "compositePrimaryKeys": {},
516
+ "uniqueConstraints": {},
517
+ "policies": {},
518
+ "checkConstraints": {},
519
+ "isRLSEnabled": false
520
+ },
521
+ "public.hf_member": {
522
+ "name": "hf_member",
523
+ "schema": "",
524
+ "columns": {
525
+ "id": {
526
+ "name": "id",
527
+ "type": "text",
528
+ "primaryKey": true,
529
+ "notNull": true
530
+ },
531
+ "organization_id": {
532
+ "name": "organization_id",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": true
536
+ },
537
+ "user_id": {
538
+ "name": "user_id",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": true
542
+ },
543
+ "role": {
544
+ "name": "role",
545
+ "type": "text",
546
+ "primaryKey": false,
547
+ "notNull": true,
548
+ "default": "'member'"
549
+ },
550
+ "created_at": {
551
+ "name": "created_at",
552
+ "type": "timestamp with time zone",
553
+ "primaryKey": false,
554
+ "notNull": true,
555
+ "default": "now()"
556
+ }
557
+ },
558
+ "indexes": {},
559
+ "foreignKeys": {
560
+ "hf_member_organization_id_hf_organization_id_fk": {
561
+ "name": "hf_member_organization_id_hf_organization_id_fk",
562
+ "tableFrom": "hf_member",
563
+ "tableTo": "hf_organization",
564
+ "columnsFrom": [
565
+ "organization_id"
566
+ ],
567
+ "columnsTo": [
568
+ "id"
569
+ ],
570
+ "onDelete": "cascade",
571
+ "onUpdate": "no action"
572
+ },
573
+ "hf_member_user_id_hf_user_id_fk": {
574
+ "name": "hf_member_user_id_hf_user_id_fk",
575
+ "tableFrom": "hf_member",
576
+ "tableTo": "hf_user",
577
+ "columnsFrom": [
578
+ "user_id"
579
+ ],
580
+ "columnsTo": [
581
+ "id"
582
+ ],
583
+ "onDelete": "cascade",
584
+ "onUpdate": "no action"
585
+ }
586
+ },
587
+ "compositePrimaryKeys": {},
588
+ "uniqueConstraints": {},
589
+ "policies": {},
590
+ "checkConstraints": {},
591
+ "isRLSEnabled": false
592
+ },
593
+ "public.hf_organization": {
594
+ "name": "hf_organization",
595
+ "schema": "",
596
+ "columns": {
597
+ "id": {
598
+ "name": "id",
599
+ "type": "text",
600
+ "primaryKey": true,
601
+ "notNull": true
602
+ },
603
+ "name": {
604
+ "name": "name",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": true
608
+ },
609
+ "slug": {
610
+ "name": "slug",
611
+ "type": "text",
612
+ "primaryKey": false,
613
+ "notNull": true
614
+ },
615
+ "logo": {
616
+ "name": "logo",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": false
620
+ },
621
+ "created_at": {
622
+ "name": "created_at",
623
+ "type": "timestamp with time zone",
624
+ "primaryKey": false,
625
+ "notNull": true,
626
+ "default": "now()"
627
+ },
628
+ "metadata": {
629
+ "name": "metadata",
630
+ "type": "text",
631
+ "primaryKey": false,
632
+ "notNull": false
633
+ }
634
+ },
635
+ "indexes": {},
636
+ "foreignKeys": {},
637
+ "compositePrimaryKeys": {},
638
+ "uniqueConstraints": {
639
+ "hf_organization_slug_unique": {
640
+ "name": "hf_organization_slug_unique",
641
+ "nullsNotDistinct": false,
642
+ "columns": [
643
+ "slug"
644
+ ]
645
+ }
646
+ },
647
+ "policies": {},
648
+ "checkConstraints": {},
649
+ "isRLSEnabled": false
650
+ },
651
+ "public.hf_passkey": {
652
+ "name": "hf_passkey",
653
+ "schema": "",
654
+ "columns": {
655
+ "id": {
656
+ "name": "id",
657
+ "type": "text",
658
+ "primaryKey": true,
659
+ "notNull": true
660
+ },
661
+ "name": {
662
+ "name": "name",
663
+ "type": "text",
664
+ "primaryKey": false,
665
+ "notNull": false
666
+ },
667
+ "public_key": {
668
+ "name": "public_key",
669
+ "type": "text",
670
+ "primaryKey": false,
671
+ "notNull": true
672
+ },
673
+ "user_id": {
674
+ "name": "user_id",
675
+ "type": "text",
676
+ "primaryKey": false,
677
+ "notNull": true
678
+ },
679
+ "credential_id": {
680
+ "name": "credential_id",
681
+ "type": "text",
682
+ "primaryKey": false,
683
+ "notNull": true
684
+ },
685
+ "counter": {
686
+ "name": "counter",
687
+ "type": "integer",
688
+ "primaryKey": false,
689
+ "notNull": true
690
+ },
691
+ "device_type": {
692
+ "name": "device_type",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": true
696
+ },
697
+ "backed_up": {
698
+ "name": "backed_up",
699
+ "type": "boolean",
700
+ "primaryKey": false,
701
+ "notNull": true
702
+ },
703
+ "transports": {
704
+ "name": "transports",
705
+ "type": "text",
706
+ "primaryKey": false,
707
+ "notNull": false
708
+ },
709
+ "created_at": {
710
+ "name": "created_at",
711
+ "type": "timestamp with time zone",
712
+ "primaryKey": false,
713
+ "notNull": false,
714
+ "default": "now()"
715
+ },
716
+ "aaguid": {
717
+ "name": "aaguid",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": false
721
+ }
722
+ },
723
+ "indexes": {},
724
+ "foreignKeys": {
725
+ "hf_passkey_user_id_hf_user_id_fk": {
726
+ "name": "hf_passkey_user_id_hf_user_id_fk",
727
+ "tableFrom": "hf_passkey",
728
+ "tableTo": "hf_user",
729
+ "columnsFrom": [
730
+ "user_id"
731
+ ],
732
+ "columnsTo": [
733
+ "id"
734
+ ],
735
+ "onDelete": "cascade",
736
+ "onUpdate": "no action"
737
+ }
738
+ },
739
+ "compositePrimaryKeys": {},
740
+ "uniqueConstraints": {},
741
+ "policies": {},
742
+ "checkConstraints": {},
743
+ "isRLSEnabled": false
744
+ },
745
+ "public.hf_session": {
746
+ "name": "hf_session",
747
+ "schema": "",
748
+ "columns": {
749
+ "id": {
750
+ "name": "id",
751
+ "type": "text",
752
+ "primaryKey": true,
753
+ "notNull": true
754
+ },
755
+ "expires_at": {
756
+ "name": "expires_at",
757
+ "type": "timestamp with time zone",
758
+ "primaryKey": false,
759
+ "notNull": true
760
+ },
761
+ "token": {
762
+ "name": "token",
763
+ "type": "text",
764
+ "primaryKey": false,
765
+ "notNull": true
766
+ },
767
+ "created_at": {
768
+ "name": "created_at",
769
+ "type": "timestamp with time zone",
770
+ "primaryKey": false,
771
+ "notNull": true,
772
+ "default": "now()"
773
+ },
774
+ "updated_at": {
775
+ "name": "updated_at",
776
+ "type": "timestamp with time zone",
777
+ "primaryKey": false,
778
+ "notNull": true,
779
+ "default": "now()"
780
+ },
781
+ "ip_address": {
782
+ "name": "ip_address",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": false
786
+ },
787
+ "user_agent": {
788
+ "name": "user_agent",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": false
792
+ },
793
+ "user_id": {
794
+ "name": "user_id",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true
798
+ },
799
+ "active_organization_id": {
800
+ "name": "active_organization_id",
801
+ "type": "text",
802
+ "primaryKey": false,
803
+ "notNull": false
804
+ },
805
+ "impersonated_by": {
806
+ "name": "impersonated_by",
807
+ "type": "text",
808
+ "primaryKey": false,
809
+ "notNull": false
810
+ },
811
+ "factor": {
812
+ "name": "factor",
813
+ "type": "text",
814
+ "primaryKey": false,
815
+ "notNull": true,
816
+ "default": "'code'"
817
+ }
818
+ },
819
+ "indexes": {},
820
+ "foreignKeys": {
821
+ "hf_session_user_id_hf_user_id_fk": {
822
+ "name": "hf_session_user_id_hf_user_id_fk",
823
+ "tableFrom": "hf_session",
824
+ "tableTo": "hf_user",
825
+ "columnsFrom": [
826
+ "user_id"
827
+ ],
828
+ "columnsTo": [
829
+ "id"
830
+ ],
831
+ "onDelete": "cascade",
832
+ "onUpdate": "no action"
833
+ }
834
+ },
835
+ "compositePrimaryKeys": {},
836
+ "uniqueConstraints": {
837
+ "hf_session_token_unique": {
838
+ "name": "hf_session_token_unique",
839
+ "nullsNotDistinct": false,
840
+ "columns": [
841
+ "token"
842
+ ]
843
+ }
844
+ },
845
+ "policies": {},
846
+ "checkConstraints": {},
847
+ "isRLSEnabled": false
848
+ },
849
+ "public.hf_user": {
850
+ "name": "hf_user",
851
+ "schema": "",
852
+ "columns": {
853
+ "id": {
854
+ "name": "id",
855
+ "type": "text",
856
+ "primaryKey": true,
857
+ "notNull": true
858
+ },
859
+ "name": {
860
+ "name": "name",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true
864
+ },
865
+ "email": {
866
+ "name": "email",
867
+ "type": "text",
868
+ "primaryKey": false,
869
+ "notNull": true
870
+ },
871
+ "email_verified": {
872
+ "name": "email_verified",
873
+ "type": "boolean",
874
+ "primaryKey": false,
875
+ "notNull": true,
876
+ "default": false
877
+ },
878
+ "image": {
879
+ "name": "image",
880
+ "type": "text",
881
+ "primaryKey": false,
882
+ "notNull": false
883
+ },
884
+ "created_at": {
885
+ "name": "created_at",
886
+ "type": "timestamp with time zone",
887
+ "primaryKey": false,
888
+ "notNull": true,
889
+ "default": "now()"
890
+ },
891
+ "updated_at": {
892
+ "name": "updated_at",
893
+ "type": "timestamp with time zone",
894
+ "primaryKey": false,
895
+ "notNull": true,
896
+ "default": "now()"
897
+ },
898
+ "role": {
899
+ "name": "role",
900
+ "type": "text",
901
+ "primaryKey": false,
902
+ "notNull": false
903
+ },
904
+ "banned": {
905
+ "name": "banned",
906
+ "type": "boolean",
907
+ "primaryKey": false,
908
+ "notNull": false,
909
+ "default": false
910
+ },
911
+ "ban_reason": {
912
+ "name": "ban_reason",
913
+ "type": "text",
914
+ "primaryKey": false,
915
+ "notNull": false
916
+ },
917
+ "ban_expires": {
918
+ "name": "ban_expires",
919
+ "type": "timestamp with time zone",
920
+ "primaryKey": false,
921
+ "notNull": false
922
+ }
923
+ },
924
+ "indexes": {},
925
+ "foreignKeys": {},
926
+ "compositePrimaryKeys": {},
927
+ "uniqueConstraints": {
928
+ "hf_user_email_unique": {
929
+ "name": "hf_user_email_unique",
930
+ "nullsNotDistinct": false,
931
+ "columns": [
932
+ "email"
933
+ ]
934
+ }
935
+ },
936
+ "policies": {},
937
+ "checkConstraints": {},
938
+ "isRLSEnabled": false
939
+ },
940
+ "public.hf_verification": {
941
+ "name": "hf_verification",
942
+ "schema": "",
943
+ "columns": {
944
+ "id": {
945
+ "name": "id",
946
+ "type": "text",
947
+ "primaryKey": true,
948
+ "notNull": true
949
+ },
950
+ "identifier": {
951
+ "name": "identifier",
952
+ "type": "text",
953
+ "primaryKey": false,
954
+ "notNull": true
955
+ },
956
+ "value": {
957
+ "name": "value",
958
+ "type": "text",
959
+ "primaryKey": false,
960
+ "notNull": true
961
+ },
962
+ "expires_at": {
963
+ "name": "expires_at",
964
+ "type": "timestamp with time zone",
965
+ "primaryKey": false,
966
+ "notNull": true
967
+ },
968
+ "created_at": {
969
+ "name": "created_at",
970
+ "type": "timestamp with time zone",
971
+ "primaryKey": false,
972
+ "notNull": true,
973
+ "default": "now()"
974
+ },
975
+ "updated_at": {
976
+ "name": "updated_at",
977
+ "type": "timestamp with time zone",
978
+ "primaryKey": false,
979
+ "notNull": true,
980
+ "default": "now()"
981
+ }
982
+ },
983
+ "indexes": {},
984
+ "foreignKeys": {},
985
+ "compositePrimaryKeys": {},
986
+ "uniqueConstraints": {},
987
+ "policies": {},
988
+ "checkConstraints": {},
989
+ "isRLSEnabled": false
990
+ },
991
+ "public.hf_action_log": {
992
+ "name": "hf_action_log",
993
+ "schema": "",
994
+ "columns": {
995
+ "id": {
996
+ "name": "id",
997
+ "type": "bigint",
998
+ "primaryKey": true,
999
+ "notNull": true,
1000
+ "identity": {
1001
+ "type": "always",
1002
+ "name": "hf_action_log_id_seq",
1003
+ "schema": "public",
1004
+ "increment": "1",
1005
+ "startWith": "1",
1006
+ "minValue": "1",
1007
+ "maxValue": "9223372036854775807",
1008
+ "cache": "1",
1009
+ "cycle": false
1010
+ }
1011
+ },
1012
+ "run_id": {
1013
+ "name": "run_id",
1014
+ "type": "text",
1015
+ "primaryKey": false,
1016
+ "notNull": true
1017
+ },
1018
+ "key": {
1019
+ "name": "key",
1020
+ "type": "text",
1021
+ "primaryKey": false,
1022
+ "notNull": true
1023
+ },
1024
+ "workflow_id": {
1025
+ "name": "workflow_id",
1026
+ "type": "text",
1027
+ "primaryKey": false,
1028
+ "notNull": true
1029
+ },
1030
+ "channel": {
1031
+ "name": "channel",
1032
+ "type": "text",
1033
+ "primaryKey": false,
1034
+ "notNull": true
1035
+ },
1036
+ "idempotency_key": {
1037
+ "name": "idempotency_key",
1038
+ "type": "text",
1039
+ "primaryKey": false,
1040
+ "notNull": true
1041
+ },
1042
+ "status": {
1043
+ "name": "status",
1044
+ "type": "text",
1045
+ "primaryKey": false,
1046
+ "notNull": true
1047
+ },
1048
+ "external_id": {
1049
+ "name": "external_id",
1050
+ "type": "text",
1051
+ "primaryKey": false,
1052
+ "notNull": false
1053
+ },
1054
+ "approval_id": {
1055
+ "name": "approval_id",
1056
+ "type": "bigint",
1057
+ "primaryKey": false,
1058
+ "notNull": false
1059
+ },
1060
+ "record_type": {
1061
+ "name": "record_type",
1062
+ "type": "text",
1063
+ "primaryKey": false,
1064
+ "notNull": false
1065
+ },
1066
+ "record_id": {
1067
+ "name": "record_id",
1068
+ "type": "text",
1069
+ "primaryKey": false,
1070
+ "notNull": false
1071
+ },
1072
+ "request": {
1073
+ "name": "request",
1074
+ "type": "jsonb",
1075
+ "primaryKey": false,
1076
+ "notNull": false
1077
+ },
1078
+ "response": {
1079
+ "name": "response",
1080
+ "type": "jsonb",
1081
+ "primaryKey": false,
1082
+ "notNull": false
1083
+ },
1084
+ "started_at": {
1085
+ "name": "started_at",
1086
+ "type": "timestamp with time zone",
1087
+ "primaryKey": false,
1088
+ "notNull": true,
1089
+ "default": "now()"
1090
+ },
1091
+ "finished_at": {
1092
+ "name": "finished_at",
1093
+ "type": "timestamp with time zone",
1094
+ "primaryKey": false,
1095
+ "notNull": false
1096
+ }
1097
+ },
1098
+ "indexes": {
1099
+ "hf_action_log_run_key_uq": {
1100
+ "name": "hf_action_log_run_key_uq",
1101
+ "columns": [
1102
+ {
1103
+ "expression": "run_id",
1104
+ "isExpression": false,
1105
+ "asc": true,
1106
+ "nulls": "last"
1107
+ },
1108
+ {
1109
+ "expression": "key",
1110
+ "isExpression": false,
1111
+ "asc": true,
1112
+ "nulls": "last"
1113
+ }
1114
+ ],
1115
+ "isUnique": true,
1116
+ "concurrently": false,
1117
+ "method": "btree",
1118
+ "with": {}
1119
+ }
1120
+ },
1121
+ "foreignKeys": {},
1122
+ "compositePrimaryKeys": {},
1123
+ "uniqueConstraints": {},
1124
+ "policies": {},
1125
+ "checkConstraints": {},
1126
+ "isRLSEnabled": false
1127
+ },
1128
+ "public.hf_budget_period": {
1129
+ "name": "hf_budget_period",
1130
+ "schema": "",
1131
+ "columns": {
1132
+ "period": {
1133
+ "name": "period",
1134
+ "type": "text",
1135
+ "primaryKey": true,
1136
+ "notNull": true
1137
+ },
1138
+ "budget_usd": {
1139
+ "name": "budget_usd",
1140
+ "type": "numeric(12, 4)",
1141
+ "primaryKey": false,
1142
+ "notNull": true
1143
+ },
1144
+ "spent_usd": {
1145
+ "name": "spent_usd",
1146
+ "type": "numeric(12, 4)",
1147
+ "primaryKey": false,
1148
+ "notNull": true,
1149
+ "default": "'0'"
1150
+ },
1151
+ "created_at": {
1152
+ "name": "created_at",
1153
+ "type": "timestamp with time zone",
1154
+ "primaryKey": false,
1155
+ "notNull": true,
1156
+ "default": "now()"
1157
+ }
1158
+ },
1159
+ "indexes": {},
1160
+ "foreignKeys": {},
1161
+ "compositePrimaryKeys": {},
1162
+ "uniqueConstraints": {},
1163
+ "policies": {},
1164
+ "checkConstraints": {
1165
+ "hf_budget_period_spent_non_negative": {
1166
+ "name": "hf_budget_period_spent_non_negative",
1167
+ "value": "\"hf_budget_period\".\"spent_usd\" >= 0"
1168
+ }
1169
+ },
1170
+ "isRLSEnabled": false
1171
+ },
1172
+ "public.hf_llm_call": {
1173
+ "name": "hf_llm_call",
1174
+ "schema": "",
1175
+ "columns": {
1176
+ "id": {
1177
+ "name": "id",
1178
+ "type": "bigint",
1179
+ "primaryKey": true,
1180
+ "notNull": true,
1181
+ "identity": {
1182
+ "type": "always",
1183
+ "name": "hf_llm_call_id_seq",
1184
+ "schema": "public",
1185
+ "increment": "1",
1186
+ "startWith": "1",
1187
+ "minValue": "1",
1188
+ "maxValue": "9223372036854775807",
1189
+ "cache": "1",
1190
+ "cycle": false
1191
+ }
1192
+ },
1193
+ "run_id": {
1194
+ "name": "run_id",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": true
1198
+ },
1199
+ "key": {
1200
+ "name": "key",
1201
+ "type": "text",
1202
+ "primaryKey": false,
1203
+ "notNull": true
1204
+ },
1205
+ "workflow_id": {
1206
+ "name": "workflow_id",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": true
1210
+ },
1211
+ "period": {
1212
+ "name": "period",
1213
+ "type": "text",
1214
+ "primaryKey": false,
1215
+ "notNull": true
1216
+ },
1217
+ "step_name": {
1218
+ "name": "step_name",
1219
+ "type": "text",
1220
+ "primaryKey": false,
1221
+ "notNull": false
1222
+ },
1223
+ "prompt_name": {
1224
+ "name": "prompt_name",
1225
+ "type": "text",
1226
+ "primaryKey": false,
1227
+ "notNull": false
1228
+ },
1229
+ "prompt_hash": {
1230
+ "name": "prompt_hash",
1231
+ "type": "text",
1232
+ "primaryKey": false,
1233
+ "notNull": false
1234
+ },
1235
+ "input_hash": {
1236
+ "name": "input_hash",
1237
+ "type": "text",
1238
+ "primaryKey": false,
1239
+ "notNull": true
1240
+ },
1241
+ "model": {
1242
+ "name": "model",
1243
+ "type": "text",
1244
+ "primaryKey": false,
1245
+ "notNull": false
1246
+ },
1247
+ "status": {
1248
+ "name": "status",
1249
+ "type": "text",
1250
+ "primaryKey": false,
1251
+ "notNull": true
1252
+ },
1253
+ "input": {
1254
+ "name": "input",
1255
+ "type": "jsonb",
1256
+ "primaryKey": false,
1257
+ "notNull": false
1258
+ },
1259
+ "output": {
1260
+ "name": "output",
1261
+ "type": "jsonb",
1262
+ "primaryKey": false,
1263
+ "notNull": false
1264
+ },
1265
+ "tokens_in": {
1266
+ "name": "tokens_in",
1267
+ "type": "integer",
1268
+ "primaryKey": false,
1269
+ "notNull": false
1270
+ },
1271
+ "tokens_out": {
1272
+ "name": "tokens_out",
1273
+ "type": "integer",
1274
+ "primaryKey": false,
1275
+ "notNull": false
1276
+ },
1277
+ "estimated_cost_usd": {
1278
+ "name": "estimated_cost_usd",
1279
+ "type": "numeric(12, 6)",
1280
+ "primaryKey": false,
1281
+ "notNull": true
1282
+ },
1283
+ "cost_usd": {
1284
+ "name": "cost_usd",
1285
+ "type": "numeric(12, 6)",
1286
+ "primaryKey": false,
1287
+ "notNull": false
1288
+ },
1289
+ "possible_double_charge": {
1290
+ "name": "possible_double_charge",
1291
+ "type": "boolean",
1292
+ "primaryKey": false,
1293
+ "notNull": true,
1294
+ "default": false
1295
+ },
1296
+ "latency_ms": {
1297
+ "name": "latency_ms",
1298
+ "type": "integer",
1299
+ "primaryKey": false,
1300
+ "notNull": false
1301
+ },
1302
+ "trace_id": {
1303
+ "name": "trace_id",
1304
+ "type": "text",
1305
+ "primaryKey": false,
1306
+ "notNull": false
1307
+ },
1308
+ "started_at": {
1309
+ "name": "started_at",
1310
+ "type": "timestamp with time zone",
1311
+ "primaryKey": false,
1312
+ "notNull": true,
1313
+ "default": "now()"
1314
+ },
1315
+ "finished_at": {
1316
+ "name": "finished_at",
1317
+ "type": "timestamp with time zone",
1318
+ "primaryKey": false,
1319
+ "notNull": false
1320
+ }
1321
+ },
1322
+ "indexes": {
1323
+ "hf_llm_call_run_key_uq": {
1324
+ "name": "hf_llm_call_run_key_uq",
1325
+ "columns": [
1326
+ {
1327
+ "expression": "run_id",
1328
+ "isExpression": false,
1329
+ "asc": true,
1330
+ "nulls": "last"
1331
+ },
1332
+ {
1333
+ "expression": "key",
1334
+ "isExpression": false,
1335
+ "asc": true,
1336
+ "nulls": "last"
1337
+ }
1338
+ ],
1339
+ "isUnique": true,
1340
+ "concurrently": false,
1341
+ "method": "btree",
1342
+ "with": {}
1343
+ },
1344
+ "hf_llm_call_period_status_idx": {
1345
+ "name": "hf_llm_call_period_status_idx",
1346
+ "columns": [
1347
+ {
1348
+ "expression": "period",
1349
+ "isExpression": false,
1350
+ "asc": true,
1351
+ "nulls": "last"
1352
+ },
1353
+ {
1354
+ "expression": "status",
1355
+ "isExpression": false,
1356
+ "asc": true,
1357
+ "nulls": "last"
1358
+ }
1359
+ ],
1360
+ "isUnique": false,
1361
+ "concurrently": false,
1362
+ "method": "btree",
1363
+ "with": {}
1364
+ }
1365
+ },
1366
+ "foreignKeys": {},
1367
+ "compositePrimaryKeys": {},
1368
+ "uniqueConstraints": {},
1369
+ "policies": {},
1370
+ "checkConstraints": {},
1371
+ "isRLSEnabled": false
1372
+ },
1373
+ "public.hf_activity": {
1374
+ "name": "hf_activity",
1375
+ "schema": "",
1376
+ "columns": {
1377
+ "id": {
1378
+ "name": "id",
1379
+ "type": "bigint",
1380
+ "primaryKey": true,
1381
+ "notNull": true,
1382
+ "identity": {
1383
+ "type": "always",
1384
+ "name": "hf_activity_id_seq",
1385
+ "schema": "public",
1386
+ "increment": "1",
1387
+ "startWith": "1",
1388
+ "minValue": "1",
1389
+ "maxValue": "9223372036854775807",
1390
+ "cache": "1",
1391
+ "cycle": false
1392
+ }
1393
+ },
1394
+ "record_type": {
1395
+ "name": "record_type",
1396
+ "type": "text",
1397
+ "primaryKey": false,
1398
+ "notNull": false
1399
+ },
1400
+ "record_id": {
1401
+ "name": "record_id",
1402
+ "type": "text",
1403
+ "primaryKey": false,
1404
+ "notNull": false
1405
+ },
1406
+ "kind": {
1407
+ "name": "kind",
1408
+ "type": "text",
1409
+ "primaryKey": false,
1410
+ "notNull": true
1411
+ },
1412
+ "actor_id": {
1413
+ "name": "actor_id",
1414
+ "type": "text",
1415
+ "primaryKey": false,
1416
+ "notNull": false
1417
+ },
1418
+ "body": {
1419
+ "name": "body",
1420
+ "type": "text",
1421
+ "primaryKey": false,
1422
+ "notNull": false
1423
+ },
1424
+ "meta": {
1425
+ "name": "meta",
1426
+ "type": "jsonb",
1427
+ "primaryKey": false,
1428
+ "notNull": false
1429
+ },
1430
+ "run_id": {
1431
+ "name": "run_id",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": false
1435
+ },
1436
+ "key": {
1437
+ "name": "key",
1438
+ "type": "text",
1439
+ "primaryKey": false,
1440
+ "notNull": false
1441
+ },
1442
+ "at": {
1443
+ "name": "at",
1444
+ "type": "timestamp with time zone",
1445
+ "primaryKey": false,
1446
+ "notNull": true,
1447
+ "default": "now()"
1448
+ }
1449
+ },
1450
+ "indexes": {
1451
+ "hf_activity_record_idx": {
1452
+ "name": "hf_activity_record_idx",
1453
+ "columns": [
1454
+ {
1455
+ "expression": "record_type",
1456
+ "isExpression": false,
1457
+ "asc": true,
1458
+ "nulls": "last"
1459
+ },
1460
+ {
1461
+ "expression": "record_id",
1462
+ "isExpression": false,
1463
+ "asc": true,
1464
+ "nulls": "last"
1465
+ }
1466
+ ],
1467
+ "isUnique": false,
1468
+ "concurrently": false,
1469
+ "method": "btree",
1470
+ "with": {}
1471
+ },
1472
+ "hf_activity_run_key_uq": {
1473
+ "name": "hf_activity_run_key_uq",
1474
+ "columns": [
1475
+ {
1476
+ "expression": "run_id",
1477
+ "isExpression": false,
1478
+ "asc": true,
1479
+ "nulls": "last"
1480
+ },
1481
+ {
1482
+ "expression": "key",
1483
+ "isExpression": false,
1484
+ "asc": true,
1485
+ "nulls": "last"
1486
+ }
1487
+ ],
1488
+ "isUnique": true,
1489
+ "where": "\"hf_activity\".\"key\" IS NOT NULL",
1490
+ "concurrently": false,
1491
+ "method": "btree",
1492
+ "with": {}
1493
+ }
1494
+ },
1495
+ "foreignKeys": {},
1496
+ "compositePrimaryKeys": {},
1497
+ "uniqueConstraints": {},
1498
+ "policies": {},
1499
+ "checkConstraints": {},
1500
+ "isRLSEnabled": false
1501
+ },
1502
+ "public.hf_label": {
1503
+ "name": "hf_label",
1504
+ "schema": "",
1505
+ "columns": {
1506
+ "id": {
1507
+ "name": "id",
1508
+ "type": "bigint",
1509
+ "primaryKey": true,
1510
+ "notNull": true,
1511
+ "identity": {
1512
+ "type": "always",
1513
+ "name": "hf_label_id_seq",
1514
+ "schema": "public",
1515
+ "increment": "1",
1516
+ "startWith": "1",
1517
+ "minValue": "1",
1518
+ "maxValue": "9223372036854775807",
1519
+ "cache": "1",
1520
+ "cycle": false
1521
+ }
1522
+ },
1523
+ "record_type": {
1524
+ "name": "record_type",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": true
1528
+ },
1529
+ "record_id": {
1530
+ "name": "record_id",
1531
+ "type": "text",
1532
+ "primaryKey": false,
1533
+ "notNull": true
1534
+ },
1535
+ "target": {
1536
+ "name": "target",
1537
+ "type": "text",
1538
+ "primaryKey": false,
1539
+ "notNull": true
1540
+ },
1541
+ "target_id": {
1542
+ "name": "target_id",
1543
+ "type": "text",
1544
+ "primaryKey": false,
1545
+ "notNull": false
1546
+ },
1547
+ "value": {
1548
+ "name": "value",
1549
+ "type": "text",
1550
+ "primaryKey": false,
1551
+ "notNull": true
1552
+ },
1553
+ "correction": {
1554
+ "name": "correction",
1555
+ "type": "jsonb",
1556
+ "primaryKey": false,
1557
+ "notNull": false
1558
+ },
1559
+ "user_id": {
1560
+ "name": "user_id",
1561
+ "type": "text",
1562
+ "primaryKey": false,
1563
+ "notNull": false
1564
+ },
1565
+ "created_at": {
1566
+ "name": "created_at",
1567
+ "type": "timestamp with time zone",
1568
+ "primaryKey": false,
1569
+ "notNull": true,
1570
+ "default": "now()"
1571
+ }
1572
+ },
1573
+ "indexes": {
1574
+ "hf_label_record_idx": {
1575
+ "name": "hf_label_record_idx",
1576
+ "columns": [
1577
+ {
1578
+ "expression": "record_type",
1579
+ "isExpression": false,
1580
+ "asc": true,
1581
+ "nulls": "last"
1582
+ },
1583
+ {
1584
+ "expression": "record_id",
1585
+ "isExpression": false,
1586
+ "asc": true,
1587
+ "nulls": "last"
1588
+ }
1589
+ ],
1590
+ "isUnique": false,
1591
+ "concurrently": false,
1592
+ "method": "btree",
1593
+ "with": {}
1594
+ }
1595
+ },
1596
+ "foreignKeys": {},
1597
+ "compositePrimaryKeys": {},
1598
+ "uniqueConstraints": {},
1599
+ "policies": {},
1600
+ "checkConstraints": {},
1601
+ "isRLSEnabled": false
1602
+ },
1603
+ "public.hf_outcome": {
1604
+ "name": "hf_outcome",
1605
+ "schema": "",
1606
+ "columns": {
1607
+ "id": {
1608
+ "name": "id",
1609
+ "type": "bigint",
1610
+ "primaryKey": true,
1611
+ "notNull": true,
1612
+ "identity": {
1613
+ "type": "always",
1614
+ "name": "hf_outcome_id_seq",
1615
+ "schema": "public",
1616
+ "increment": "1",
1617
+ "startWith": "1",
1618
+ "minValue": "1",
1619
+ "maxValue": "9223372036854775807",
1620
+ "cache": "1",
1621
+ "cycle": false
1622
+ }
1623
+ },
1624
+ "record_type": {
1625
+ "name": "record_type",
1626
+ "type": "text",
1627
+ "primaryKey": false,
1628
+ "notNull": true
1629
+ },
1630
+ "record_id": {
1631
+ "name": "record_id",
1632
+ "type": "text",
1633
+ "primaryKey": false,
1634
+ "notNull": true
1635
+ },
1636
+ "outcome": {
1637
+ "name": "outcome",
1638
+ "type": "text",
1639
+ "primaryKey": false,
1640
+ "notNull": true
1641
+ },
1642
+ "at": {
1643
+ "name": "at",
1644
+ "type": "timestamp with time zone",
1645
+ "primaryKey": false,
1646
+ "notNull": true,
1647
+ "default": "now()"
1648
+ },
1649
+ "notes": {
1650
+ "name": "notes",
1651
+ "type": "text",
1652
+ "primaryKey": false,
1653
+ "notNull": false
1654
+ }
1655
+ },
1656
+ "indexes": {
1657
+ "hf_outcome_record_idx": {
1658
+ "name": "hf_outcome_record_idx",
1659
+ "columns": [
1660
+ {
1661
+ "expression": "record_type",
1662
+ "isExpression": false,
1663
+ "asc": true,
1664
+ "nulls": "last"
1665
+ },
1666
+ {
1667
+ "expression": "record_id",
1668
+ "isExpression": false,
1669
+ "asc": true,
1670
+ "nulls": "last"
1671
+ }
1672
+ ],
1673
+ "isUnique": false,
1674
+ "concurrently": false,
1675
+ "method": "btree",
1676
+ "with": {}
1677
+ }
1678
+ },
1679
+ "foreignKeys": {},
1680
+ "compositePrimaryKeys": {},
1681
+ "uniqueConstraints": {},
1682
+ "policies": {},
1683
+ "checkConstraints": {},
1684
+ "isRLSEnabled": false
1685
+ },
1686
+ "public.hf_record_link": {
1687
+ "name": "hf_record_link",
1688
+ "schema": "",
1689
+ "columns": {
1690
+ "id": {
1691
+ "name": "id",
1692
+ "type": "bigint",
1693
+ "primaryKey": true,
1694
+ "notNull": true,
1695
+ "identity": {
1696
+ "type": "always",
1697
+ "name": "hf_record_link_id_seq",
1698
+ "schema": "public",
1699
+ "increment": "1",
1700
+ "startWith": "1",
1701
+ "minValue": "1",
1702
+ "maxValue": "9223372036854775807",
1703
+ "cache": "1",
1704
+ "cycle": false
1705
+ }
1706
+ },
1707
+ "source_record_id": {
1708
+ "name": "source_record_id",
1709
+ "type": "bigint",
1710
+ "primaryKey": false,
1711
+ "notNull": true
1712
+ },
1713
+ "record_type": {
1714
+ "name": "record_type",
1715
+ "type": "text",
1716
+ "primaryKey": false,
1717
+ "notNull": true
1718
+ },
1719
+ "record_id": {
1720
+ "name": "record_id",
1721
+ "type": "text",
1722
+ "primaryKey": false,
1723
+ "notNull": true
1724
+ },
1725
+ "confidence": {
1726
+ "name": "confidence",
1727
+ "type": "double precision",
1728
+ "primaryKey": false,
1729
+ "notNull": false
1730
+ },
1731
+ "method": {
1732
+ "name": "method",
1733
+ "type": "text",
1734
+ "primaryKey": false,
1735
+ "notNull": true
1736
+ },
1737
+ "decided_by": {
1738
+ "name": "decided_by",
1739
+ "type": "text",
1740
+ "primaryKey": false,
1741
+ "notNull": false
1742
+ },
1743
+ "decided_at": {
1744
+ "name": "decided_at",
1745
+ "type": "timestamp with time zone",
1746
+ "primaryKey": false,
1747
+ "notNull": false
1748
+ }
1749
+ },
1750
+ "indexes": {
1751
+ "hf_record_link_source_record_uq": {
1752
+ "name": "hf_record_link_source_record_uq",
1753
+ "columns": [
1754
+ {
1755
+ "expression": "source_record_id",
1756
+ "isExpression": false,
1757
+ "asc": true,
1758
+ "nulls": "last"
1759
+ }
1760
+ ],
1761
+ "isUnique": true,
1762
+ "concurrently": false,
1763
+ "method": "btree",
1764
+ "with": {}
1765
+ },
1766
+ "hf_record_link_record_idx": {
1767
+ "name": "hf_record_link_record_idx",
1768
+ "columns": [
1769
+ {
1770
+ "expression": "record_type",
1771
+ "isExpression": false,
1772
+ "asc": true,
1773
+ "nulls": "last"
1774
+ },
1775
+ {
1776
+ "expression": "record_id",
1777
+ "isExpression": false,
1778
+ "asc": true,
1779
+ "nulls": "last"
1780
+ }
1781
+ ],
1782
+ "isUnique": false,
1783
+ "concurrently": false,
1784
+ "method": "btree",
1785
+ "with": {}
1786
+ }
1787
+ },
1788
+ "foreignKeys": {},
1789
+ "compositePrimaryKeys": {},
1790
+ "uniqueConstraints": {},
1791
+ "policies": {},
1792
+ "checkConstraints": {},
1793
+ "isRLSEnabled": false
1794
+ },
1795
+ "public.hf_score": {
1796
+ "name": "hf_score",
1797
+ "schema": "",
1798
+ "columns": {
1799
+ "id": {
1800
+ "name": "id",
1801
+ "type": "bigint",
1802
+ "primaryKey": true,
1803
+ "notNull": true,
1804
+ "identity": {
1805
+ "type": "always",
1806
+ "name": "hf_score_id_seq",
1807
+ "schema": "public",
1808
+ "increment": "1",
1809
+ "startWith": "1",
1810
+ "minValue": "1",
1811
+ "maxValue": "9223372036854775807",
1812
+ "cache": "1",
1813
+ "cycle": false
1814
+ }
1815
+ },
1816
+ "record_type": {
1817
+ "name": "record_type",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": true
1821
+ },
1822
+ "record_id": {
1823
+ "name": "record_id",
1824
+ "type": "text",
1825
+ "primaryKey": false,
1826
+ "notNull": true
1827
+ },
1828
+ "spec_name": {
1829
+ "name": "spec_name",
1830
+ "type": "text",
1831
+ "primaryKey": false,
1832
+ "notNull": false
1833
+ },
1834
+ "spec_version": {
1835
+ "name": "spec_version",
1836
+ "type": "integer",
1837
+ "primaryKey": false,
1838
+ "notNull": true
1839
+ },
1840
+ "score": {
1841
+ "name": "score",
1842
+ "type": "double precision",
1843
+ "primaryKey": false,
1844
+ "notNull": true
1845
+ },
1846
+ "explanation": {
1847
+ "name": "explanation",
1848
+ "type": "text",
1849
+ "primaryKey": false,
1850
+ "notNull": false
1851
+ },
1852
+ "llm_call_id": {
1853
+ "name": "llm_call_id",
1854
+ "type": "bigint",
1855
+ "primaryKey": false,
1856
+ "notNull": false
1857
+ },
1858
+ "run_id": {
1859
+ "name": "run_id",
1860
+ "type": "text",
1861
+ "primaryKey": false,
1862
+ "notNull": false
1863
+ },
1864
+ "key": {
1865
+ "name": "key",
1866
+ "type": "text",
1867
+ "primaryKey": false,
1868
+ "notNull": false
1869
+ },
1870
+ "created_at": {
1871
+ "name": "created_at",
1872
+ "type": "timestamp with time zone",
1873
+ "primaryKey": false,
1874
+ "notNull": true,
1875
+ "default": "now()"
1876
+ }
1877
+ },
1878
+ "indexes": {
1879
+ "hf_score_record_idx": {
1880
+ "name": "hf_score_record_idx",
1881
+ "columns": [
1882
+ {
1883
+ "expression": "record_type",
1884
+ "isExpression": false,
1885
+ "asc": true,
1886
+ "nulls": "last"
1887
+ },
1888
+ {
1889
+ "expression": "record_id",
1890
+ "isExpression": false,
1891
+ "asc": true,
1892
+ "nulls": "last"
1893
+ }
1894
+ ],
1895
+ "isUnique": false,
1896
+ "concurrently": false,
1897
+ "method": "btree",
1898
+ "with": {}
1899
+ },
1900
+ "hf_score_run_key_spec_uq": {
1901
+ "name": "hf_score_run_key_spec_uq",
1902
+ "columns": [
1903
+ {
1904
+ "expression": "run_id",
1905
+ "isExpression": false,
1906
+ "asc": true,
1907
+ "nulls": "last"
1908
+ },
1909
+ {
1910
+ "expression": "key",
1911
+ "isExpression": false,
1912
+ "asc": true,
1913
+ "nulls": "last"
1914
+ },
1915
+ {
1916
+ "expression": "spec_name",
1917
+ "isExpression": false,
1918
+ "asc": true,
1919
+ "nulls": "last"
1920
+ }
1921
+ ],
1922
+ "isUnique": true,
1923
+ "where": "\"hf_score\".\"key\" IS NOT NULL",
1924
+ "concurrently": false,
1925
+ "method": "btree",
1926
+ "with": {}
1927
+ }
1928
+ },
1929
+ "foreignKeys": {},
1930
+ "compositePrimaryKeys": {},
1931
+ "uniqueConstraints": {},
1932
+ "policies": {},
1933
+ "checkConstraints": {},
1934
+ "isRLSEnabled": false
1935
+ },
1936
+ "public.hf_source_record": {
1937
+ "name": "hf_source_record",
1938
+ "schema": "",
1939
+ "columns": {
1940
+ "id": {
1941
+ "name": "id",
1942
+ "type": "bigint",
1943
+ "primaryKey": true,
1944
+ "notNull": true,
1945
+ "identity": {
1946
+ "type": "always",
1947
+ "name": "hf_source_record_id_seq",
1948
+ "schema": "public",
1949
+ "increment": "1",
1950
+ "startWith": "1",
1951
+ "minValue": "1",
1952
+ "maxValue": "9223372036854775807",
1953
+ "cache": "1",
1954
+ "cycle": false
1955
+ }
1956
+ },
1957
+ "source": {
1958
+ "name": "source",
1959
+ "type": "text",
1960
+ "primaryKey": false,
1961
+ "notNull": true
1962
+ },
1963
+ "external_id": {
1964
+ "name": "external_id",
1965
+ "type": "text",
1966
+ "primaryKey": false,
1967
+ "notNull": true
1968
+ },
1969
+ "payload": {
1970
+ "name": "payload",
1971
+ "type": "jsonb",
1972
+ "primaryKey": false,
1973
+ "notNull": true
1974
+ },
1975
+ "payload_hash": {
1976
+ "name": "payload_hash",
1977
+ "type": "text",
1978
+ "primaryKey": false,
1979
+ "notNull": true
1980
+ },
1981
+ "status": {
1982
+ "name": "status",
1983
+ "type": "text",
1984
+ "primaryKey": false,
1985
+ "notNull": true,
1986
+ "default": "'new'"
1987
+ },
1988
+ "attempts": {
1989
+ "name": "attempts",
1990
+ "type": "integer",
1991
+ "primaryKey": false,
1992
+ "notNull": true,
1993
+ "default": 0
1994
+ },
1995
+ "error": {
1996
+ "name": "error",
1997
+ "type": "text",
1998
+ "primaryKey": false,
1999
+ "notNull": false
2000
+ },
2001
+ "run_id": {
2002
+ "name": "run_id",
2003
+ "type": "bigint",
2004
+ "primaryKey": false,
2005
+ "notNull": false
2006
+ },
2007
+ "first_seen": {
2008
+ "name": "first_seen",
2009
+ "type": "timestamp with time zone",
2010
+ "primaryKey": false,
2011
+ "notNull": true,
2012
+ "default": "now()"
2013
+ },
2014
+ "last_seen": {
2015
+ "name": "last_seen",
2016
+ "type": "timestamp with time zone",
2017
+ "primaryKey": false,
2018
+ "notNull": true,
2019
+ "default": "now()"
2020
+ }
2021
+ },
2022
+ "indexes": {
2023
+ "hf_source_record_source_external_uq": {
2024
+ "name": "hf_source_record_source_external_uq",
2025
+ "columns": [
2026
+ {
2027
+ "expression": "source",
2028
+ "isExpression": false,
2029
+ "asc": true,
2030
+ "nulls": "last"
2031
+ },
2032
+ {
2033
+ "expression": "external_id",
2034
+ "isExpression": false,
2035
+ "asc": true,
2036
+ "nulls": "last"
2037
+ }
2038
+ ],
2039
+ "isUnique": true,
2040
+ "concurrently": false,
2041
+ "method": "btree",
2042
+ "with": {}
2043
+ },
2044
+ "hf_source_record_status_idx": {
2045
+ "name": "hf_source_record_status_idx",
2046
+ "columns": [
2047
+ {
2048
+ "expression": "status",
2049
+ "isExpression": false,
2050
+ "asc": true,
2051
+ "nulls": "last"
2052
+ }
2053
+ ],
2054
+ "isUnique": false,
2055
+ "concurrently": false,
2056
+ "method": "btree",
2057
+ "with": {}
2058
+ }
2059
+ },
2060
+ "foreignKeys": {},
2061
+ "compositePrimaryKeys": {},
2062
+ "uniqueConstraints": {},
2063
+ "policies": {},
2064
+ "checkConstraints": {},
2065
+ "isRLSEnabled": false
2066
+ },
2067
+ "public.hf_source_run": {
2068
+ "name": "hf_source_run",
2069
+ "schema": "",
2070
+ "columns": {
2071
+ "id": {
2072
+ "name": "id",
2073
+ "type": "bigint",
2074
+ "primaryKey": true,
2075
+ "notNull": true,
2076
+ "identity": {
2077
+ "type": "always",
2078
+ "name": "hf_source_run_id_seq",
2079
+ "schema": "public",
2080
+ "increment": "1",
2081
+ "startWith": "1",
2082
+ "minValue": "1",
2083
+ "maxValue": "9223372036854775807",
2084
+ "cache": "1",
2085
+ "cycle": false
2086
+ }
2087
+ },
2088
+ "source": {
2089
+ "name": "source",
2090
+ "type": "text",
2091
+ "primaryKey": false,
2092
+ "notNull": true
2093
+ },
2094
+ "started_at": {
2095
+ "name": "started_at",
2096
+ "type": "timestamp with time zone",
2097
+ "primaryKey": false,
2098
+ "notNull": true,
2099
+ "default": "now()"
2100
+ },
2101
+ "finished_at": {
2102
+ "name": "finished_at",
2103
+ "type": "timestamp with time zone",
2104
+ "primaryKey": false,
2105
+ "notNull": false
2106
+ },
2107
+ "status": {
2108
+ "name": "status",
2109
+ "type": "text",
2110
+ "primaryKey": false,
2111
+ "notNull": true
2112
+ },
2113
+ "rows_in": {
2114
+ "name": "rows_in",
2115
+ "type": "integer",
2116
+ "primaryKey": false,
2117
+ "notNull": true,
2118
+ "default": 0
2119
+ },
2120
+ "rows_new": {
2121
+ "name": "rows_new",
2122
+ "type": "integer",
2123
+ "primaryKey": false,
2124
+ "notNull": true,
2125
+ "default": 0
2126
+ },
2127
+ "rows_changed": {
2128
+ "name": "rows_changed",
2129
+ "type": "integer",
2130
+ "primaryKey": false,
2131
+ "notNull": true,
2132
+ "default": 0
2133
+ },
2134
+ "error": {
2135
+ "name": "error",
2136
+ "type": "text",
2137
+ "primaryKey": false,
2138
+ "notNull": false
2139
+ }
2140
+ },
2141
+ "indexes": {},
2142
+ "foreignKeys": {},
2143
+ "compositePrimaryKeys": {},
2144
+ "uniqueConstraints": {},
2145
+ "policies": {},
2146
+ "checkConstraints": {},
2147
+ "isRLSEnabled": false
2148
+ },
2149
+ "public.hf_task": {
2150
+ "name": "hf_task",
2151
+ "schema": "",
2152
+ "columns": {
2153
+ "id": {
2154
+ "name": "id",
2155
+ "type": "bigint",
2156
+ "primaryKey": true,
2157
+ "notNull": true,
2158
+ "identity": {
2159
+ "type": "always",
2160
+ "name": "hf_task_id_seq",
2161
+ "schema": "public",
2162
+ "increment": "1",
2163
+ "startWith": "1",
2164
+ "minValue": "1",
2165
+ "maxValue": "9223372036854775807",
2166
+ "cache": "1",
2167
+ "cycle": false
2168
+ }
2169
+ },
2170
+ "record_type": {
2171
+ "name": "record_type",
2172
+ "type": "text",
2173
+ "primaryKey": false,
2174
+ "notNull": false
2175
+ },
2176
+ "record_id": {
2177
+ "name": "record_id",
2178
+ "type": "text",
2179
+ "primaryKey": false,
2180
+ "notNull": false
2181
+ },
2182
+ "title": {
2183
+ "name": "title",
2184
+ "type": "text",
2185
+ "primaryKey": false,
2186
+ "notNull": true
2187
+ },
2188
+ "due_at": {
2189
+ "name": "due_at",
2190
+ "type": "timestamp with time zone",
2191
+ "primaryKey": false,
2192
+ "notNull": false
2193
+ },
2194
+ "owner_id": {
2195
+ "name": "owner_id",
2196
+ "type": "text",
2197
+ "primaryKey": false,
2198
+ "notNull": false
2199
+ },
2200
+ "done_at": {
2201
+ "name": "done_at",
2202
+ "type": "timestamp with time zone",
2203
+ "primaryKey": false,
2204
+ "notNull": false
2205
+ },
2206
+ "cancelled_at": {
2207
+ "name": "cancelled_at",
2208
+ "type": "timestamp with time zone",
2209
+ "primaryKey": false,
2210
+ "notNull": false
2211
+ },
2212
+ "origin": {
2213
+ "name": "origin",
2214
+ "type": "text",
2215
+ "primaryKey": false,
2216
+ "notNull": true
2217
+ },
2218
+ "origin_ref": {
2219
+ "name": "origin_ref",
2220
+ "type": "text",
2221
+ "primaryKey": false,
2222
+ "notNull": false
2223
+ },
2224
+ "created_at": {
2225
+ "name": "created_at",
2226
+ "type": "timestamp with time zone",
2227
+ "primaryKey": false,
2228
+ "notNull": true,
2229
+ "default": "now()"
2230
+ }
2231
+ },
2232
+ "indexes": {
2233
+ "hf_task_record_idx": {
2234
+ "name": "hf_task_record_idx",
2235
+ "columns": [
2236
+ {
2237
+ "expression": "record_type",
2238
+ "isExpression": false,
2239
+ "asc": true,
2240
+ "nulls": "last"
2241
+ },
2242
+ {
2243
+ "expression": "record_id",
2244
+ "isExpression": false,
2245
+ "asc": true,
2246
+ "nulls": "last"
2247
+ }
2248
+ ],
2249
+ "isUnique": false,
2250
+ "concurrently": false,
2251
+ "method": "btree",
2252
+ "with": {}
2253
+ },
2254
+ "hf_task_origin_ref_uq": {
2255
+ "name": "hf_task_origin_ref_uq",
2256
+ "columns": [
2257
+ {
2258
+ "expression": "origin",
2259
+ "isExpression": false,
2260
+ "asc": true,
2261
+ "nulls": "last"
2262
+ },
2263
+ {
2264
+ "expression": "origin_ref",
2265
+ "isExpression": false,
2266
+ "asc": true,
2267
+ "nulls": "last"
2268
+ }
2269
+ ],
2270
+ "isUnique": true,
2271
+ "where": "\"hf_task\".\"origin_ref\" IS NOT NULL",
2272
+ "concurrently": false,
2273
+ "method": "btree",
2274
+ "with": {}
2275
+ }
2276
+ },
2277
+ "foreignKeys": {},
2278
+ "compositePrimaryKeys": {},
2279
+ "uniqueConstraints": {},
2280
+ "policies": {},
2281
+ "checkConstraints": {},
2282
+ "isRLSEnabled": false
2283
+ },
2284
+ "public.hf_run": {
2285
+ "name": "hf_run",
2286
+ "schema": "",
2287
+ "columns": {
2288
+ "run_id": {
2289
+ "name": "run_id",
2290
+ "type": "text",
2291
+ "primaryKey": true,
2292
+ "notNull": true
2293
+ },
2294
+ "flow": {
2295
+ "name": "flow",
2296
+ "type": "text",
2297
+ "primaryKey": false,
2298
+ "notNull": true
2299
+ },
2300
+ "input": {
2301
+ "name": "input",
2302
+ "type": "jsonb",
2303
+ "primaryKey": false,
2304
+ "notNull": false
2305
+ },
2306
+ "status": {
2307
+ "name": "status",
2308
+ "type": "text",
2309
+ "primaryKey": false,
2310
+ "notNull": true
2311
+ },
2312
+ "attempt": {
2313
+ "name": "attempt",
2314
+ "type": "integer",
2315
+ "primaryKey": false,
2316
+ "notNull": true,
2317
+ "default": 1
2318
+ },
2319
+ "current_workflow_id": {
2320
+ "name": "current_workflow_id",
2321
+ "type": "text",
2322
+ "primaryKey": false,
2323
+ "notNull": true
2324
+ },
2325
+ "version": {
2326
+ "name": "version",
2327
+ "type": "text",
2328
+ "primaryKey": false,
2329
+ "notNull": false
2330
+ },
2331
+ "record_type": {
2332
+ "name": "record_type",
2333
+ "type": "text",
2334
+ "primaryKey": false,
2335
+ "notNull": false
2336
+ },
2337
+ "record_id": {
2338
+ "name": "record_id",
2339
+ "type": "text",
2340
+ "primaryKey": false,
2341
+ "notNull": false
2342
+ },
2343
+ "error": {
2344
+ "name": "error",
2345
+ "type": "text",
2346
+ "primaryKey": false,
2347
+ "notNull": false
2348
+ },
2349
+ "started_at": {
2350
+ "name": "started_at",
2351
+ "type": "timestamp with time zone",
2352
+ "primaryKey": false,
2353
+ "notNull": true,
2354
+ "default": "now()"
2355
+ },
2356
+ "finished_at": {
2357
+ "name": "finished_at",
2358
+ "type": "timestamp with time zone",
2359
+ "primaryKey": false,
2360
+ "notNull": false
2361
+ }
2362
+ },
2363
+ "indexes": {
2364
+ "hf_run_status_idx": {
2365
+ "name": "hf_run_status_idx",
2366
+ "columns": [
2367
+ {
2368
+ "expression": "status",
2369
+ "isExpression": false,
2370
+ "asc": true,
2371
+ "nulls": "last"
2372
+ }
2373
+ ],
2374
+ "isUnique": false,
2375
+ "concurrently": false,
2376
+ "method": "btree",
2377
+ "with": {}
2378
+ },
2379
+ "hf_run_record_idx": {
2380
+ "name": "hf_run_record_idx",
2381
+ "columns": [
2382
+ {
2383
+ "expression": "record_type",
2384
+ "isExpression": false,
2385
+ "asc": true,
2386
+ "nulls": "last"
2387
+ },
2388
+ {
2389
+ "expression": "record_id",
2390
+ "isExpression": false,
2391
+ "asc": true,
2392
+ "nulls": "last"
2393
+ }
2394
+ ],
2395
+ "isUnique": false,
2396
+ "concurrently": false,
2397
+ "method": "btree",
2398
+ "with": {}
2399
+ }
2400
+ },
2401
+ "foreignKeys": {},
2402
+ "compositePrimaryKeys": {},
2403
+ "uniqueConstraints": {
2404
+ "hf_run_current_workflow_id_unique": {
2405
+ "name": "hf_run_current_workflow_id_unique",
2406
+ "nullsNotDistinct": false,
2407
+ "columns": [
2408
+ "current_workflow_id"
2409
+ ]
2410
+ }
2411
+ },
2412
+ "policies": {},
2413
+ "checkConstraints": {
2414
+ "hf_run_attempt_positive": {
2415
+ "name": "hf_run_attempt_positive",
2416
+ "value": "\"hf_run\".\"attempt\" >= 1"
2417
+ }
2418
+ },
2419
+ "isRLSEnabled": false
2420
+ }
2421
+ },
2422
+ "enums": {},
2423
+ "schemas": {},
2424
+ "sequences": {},
2425
+ "roles": {},
2426
+ "policies": {},
2427
+ "views": {},
2428
+ "_meta": {
2429
+ "columns": {},
2430
+ "schemas": {},
2431
+ "tables": {}
2432
+ }
2433
+ }