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