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