@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,3430 @@
1
+ {
2
+ "id": "322cb399-beee-4c86-856e-1cacb518ede8",
3
+ "prevId": "761036e6-7103-4e96-aa2d-baa7ad3a20c4",
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
+ "role": {
263
+ "name": "role",
264
+ "type": "text",
265
+ "primaryKey": false,
266
+ "notNull": false
267
+ },
268
+ "device_fingerprint": {
269
+ "name": "device_fingerprint",
270
+ "type": "text",
271
+ "primaryKey": false,
272
+ "notNull": true
273
+ },
274
+ "capabilities": {
275
+ "name": "capabilities",
276
+ "type": "jsonb",
277
+ "primaryKey": false,
278
+ "notNull": true,
279
+ "default": "'[]'::jsonb"
280
+ },
281
+ "last_seen_at": {
282
+ "name": "last_seen_at",
283
+ "type": "timestamp with time zone",
284
+ "primaryKey": false,
285
+ "notNull": true,
286
+ "default": "now()"
287
+ },
288
+ "revoked_at": {
289
+ "name": "revoked_at",
290
+ "type": "timestamp with time zone",
291
+ "primaryKey": false,
292
+ "notNull": false
293
+ },
294
+ "created_at": {
295
+ "name": "created_at",
296
+ "type": "timestamp with time zone",
297
+ "primaryKey": false,
298
+ "notNull": true,
299
+ "default": "now()"
300
+ }
301
+ },
302
+ "indexes": {
303
+ "agent_installations_user_device_name": {
304
+ "name": "agent_installations_user_device_name",
305
+ "columns": [
306
+ {
307
+ "expression": "user_id",
308
+ "isExpression": false,
309
+ "asc": true,
310
+ "nulls": "last"
311
+ },
312
+ {
313
+ "expression": "device_fingerprint",
314
+ "isExpression": false,
315
+ "asc": true,
316
+ "nulls": "last"
317
+ },
318
+ {
319
+ "expression": "name",
320
+ "isExpression": false,
321
+ "asc": true,
322
+ "nulls": "last"
323
+ }
324
+ ],
325
+ "isUnique": true,
326
+ "concurrently": false,
327
+ "method": "btree",
328
+ "with": {}
329
+ }
330
+ },
331
+ "foreignKeys": {
332
+ "agent_installations_user_id_users_id_fk": {
333
+ "name": "agent_installations_user_id_users_id_fk",
334
+ "tableFrom": "agent_installations",
335
+ "tableTo": "users",
336
+ "columnsFrom": [
337
+ "user_id"
338
+ ],
339
+ "columnsTo": [
340
+ "id"
341
+ ],
342
+ "onDelete": "cascade",
343
+ "onUpdate": "no action"
344
+ }
345
+ },
346
+ "compositePrimaryKeys": {},
347
+ "uniqueConstraints": {},
348
+ "policies": {},
349
+ "checkConstraints": {},
350
+ "isRLSEnabled": false
351
+ },
352
+ "public.agent_runs": {
353
+ "name": "agent_runs",
354
+ "schema": "",
355
+ "columns": {
356
+ "id": {
357
+ "name": "id",
358
+ "type": "uuid",
359
+ "primaryKey": true,
360
+ "notNull": true,
361
+ "default": "gen_random_uuid()"
362
+ },
363
+ "installation_id": {
364
+ "name": "installation_id",
365
+ "type": "uuid",
366
+ "primaryKey": false,
367
+ "notNull": true
368
+ },
369
+ "team_id": {
370
+ "name": "team_id",
371
+ "type": "uuid",
372
+ "primaryKey": false,
373
+ "notNull": true
374
+ },
375
+ "project_id": {
376
+ "name": "project_id",
377
+ "type": "uuid",
378
+ "primaryKey": false,
379
+ "notNull": false
380
+ },
381
+ "task_key": {
382
+ "name": "task_key",
383
+ "type": "text",
384
+ "primaryKey": false,
385
+ "notNull": false
386
+ },
387
+ "intent": {
388
+ "name": "intent",
389
+ "type": "text",
390
+ "primaryKey": false,
391
+ "notNull": false
392
+ },
393
+ "repo": {
394
+ "name": "repo",
395
+ "type": "text",
396
+ "primaryKey": false,
397
+ "notNull": false
398
+ },
399
+ "branch": {
400
+ "name": "branch",
401
+ "type": "text",
402
+ "primaryKey": false,
403
+ "notNull": false
404
+ },
405
+ "worktree": {
406
+ "name": "worktree",
407
+ "type": "text",
408
+ "primaryKey": false,
409
+ "notNull": false
410
+ },
411
+ "base_sha": {
412
+ "name": "base_sha",
413
+ "type": "text",
414
+ "primaryKey": false,
415
+ "notNull": false
416
+ },
417
+ "status": {
418
+ "name": "status",
419
+ "type": "text",
420
+ "primaryKey": false,
421
+ "notNull": true,
422
+ "default": "'starting'"
423
+ },
424
+ "policy_hash": {
425
+ "name": "policy_hash",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": false
429
+ },
430
+ "environment_fingerprint": {
431
+ "name": "environment_fingerprint",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": false
435
+ },
436
+ "attempt_group": {
437
+ "name": "attempt_group",
438
+ "type": "text",
439
+ "primaryKey": false,
440
+ "notNull": false
441
+ },
442
+ "quota_pct": {
443
+ "name": "quota_pct",
444
+ "type": "integer",
445
+ "primaryKey": false,
446
+ "notNull": false
447
+ },
448
+ "quota_state": {
449
+ "name": "quota_state",
450
+ "type": "text",
451
+ "primaryKey": false,
452
+ "notNull": false
453
+ },
454
+ "quota_resets_at": {
455
+ "name": "quota_resets_at",
456
+ "type": "timestamp with time zone",
457
+ "primaryKey": false,
458
+ "notNull": false
459
+ },
460
+ "quota_label": {
461
+ "name": "quota_label",
462
+ "type": "text",
463
+ "primaryKey": false,
464
+ "notNull": false
465
+ },
466
+ "quota_source": {
467
+ "name": "quota_source",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": false
471
+ },
472
+ "started_at": {
473
+ "name": "started_at",
474
+ "type": "timestamp with time zone",
475
+ "primaryKey": false,
476
+ "notNull": true,
477
+ "default": "now()"
478
+ },
479
+ "last_heartbeat_at": {
480
+ "name": "last_heartbeat_at",
481
+ "type": "timestamp with time zone",
482
+ "primaryKey": false,
483
+ "notNull": true,
484
+ "default": "now()"
485
+ },
486
+ "ended_at": {
487
+ "name": "ended_at",
488
+ "type": "timestamp with time zone",
489
+ "primaryKey": false,
490
+ "notNull": false
491
+ }
492
+ },
493
+ "indexes": {
494
+ "agent_runs_team_status_heartbeat": {
495
+ "name": "agent_runs_team_status_heartbeat",
496
+ "columns": [
497
+ {
498
+ "expression": "team_id",
499
+ "isExpression": false,
500
+ "asc": true,
501
+ "nulls": "last"
502
+ },
503
+ {
504
+ "expression": "status",
505
+ "isExpression": false,
506
+ "asc": true,
507
+ "nulls": "last"
508
+ },
509
+ {
510
+ "expression": "last_heartbeat_at",
511
+ "isExpression": false,
512
+ "asc": true,
513
+ "nulls": "last"
514
+ }
515
+ ],
516
+ "isUnique": false,
517
+ "concurrently": false,
518
+ "method": "btree",
519
+ "with": {}
520
+ },
521
+ "agent_runs_installation_started": {
522
+ "name": "agent_runs_installation_started",
523
+ "columns": [
524
+ {
525
+ "expression": "installation_id",
526
+ "isExpression": false,
527
+ "asc": true,
528
+ "nulls": "last"
529
+ },
530
+ {
531
+ "expression": "started_at",
532
+ "isExpression": false,
533
+ "asc": true,
534
+ "nulls": "last"
535
+ }
536
+ ],
537
+ "isUnique": false,
538
+ "concurrently": false,
539
+ "method": "btree",
540
+ "with": {}
541
+ }
542
+ },
543
+ "foreignKeys": {
544
+ "agent_runs_installation_id_agent_installations_id_fk": {
545
+ "name": "agent_runs_installation_id_agent_installations_id_fk",
546
+ "tableFrom": "agent_runs",
547
+ "tableTo": "agent_installations",
548
+ "columnsFrom": [
549
+ "installation_id"
550
+ ],
551
+ "columnsTo": [
552
+ "id"
553
+ ],
554
+ "onDelete": "cascade",
555
+ "onUpdate": "no action"
556
+ },
557
+ "agent_runs_team_id_teams_id_fk": {
558
+ "name": "agent_runs_team_id_teams_id_fk",
559
+ "tableFrom": "agent_runs",
560
+ "tableTo": "teams",
561
+ "columnsFrom": [
562
+ "team_id"
563
+ ],
564
+ "columnsTo": [
565
+ "id"
566
+ ],
567
+ "onDelete": "cascade",
568
+ "onUpdate": "no action"
569
+ },
570
+ "agent_runs_project_id_projects_id_fk": {
571
+ "name": "agent_runs_project_id_projects_id_fk",
572
+ "tableFrom": "agent_runs",
573
+ "tableTo": "projects",
574
+ "columnsFrom": [
575
+ "project_id"
576
+ ],
577
+ "columnsTo": [
578
+ "id"
579
+ ],
580
+ "onDelete": "set null",
581
+ "onUpdate": "no action"
582
+ }
583
+ },
584
+ "compositePrimaryKeys": {},
585
+ "uniqueConstraints": {},
586
+ "policies": {},
587
+ "checkConstraints": {},
588
+ "isRLSEnabled": false
589
+ },
590
+ "public.auth_codes": {
591
+ "name": "auth_codes",
592
+ "schema": "",
593
+ "columns": {
594
+ "id": {
595
+ "name": "id",
596
+ "type": "uuid",
597
+ "primaryKey": true,
598
+ "notNull": true,
599
+ "default": "gen_random_uuid()"
600
+ },
601
+ "user_id": {
602
+ "name": "user_id",
603
+ "type": "uuid",
604
+ "primaryKey": false,
605
+ "notNull": true
606
+ },
607
+ "purpose": {
608
+ "name": "purpose",
609
+ "type": "text",
610
+ "primaryKey": false,
611
+ "notNull": true
612
+ },
613
+ "code_hash": {
614
+ "name": "code_hash",
615
+ "type": "text",
616
+ "primaryKey": false,
617
+ "notNull": true
618
+ },
619
+ "expires_at": {
620
+ "name": "expires_at",
621
+ "type": "timestamp with time zone",
622
+ "primaryKey": false,
623
+ "notNull": true
624
+ },
625
+ "attempts": {
626
+ "name": "attempts",
627
+ "type": "integer",
628
+ "primaryKey": false,
629
+ "notNull": true,
630
+ "default": 0
631
+ },
632
+ "consumed_at": {
633
+ "name": "consumed_at",
634
+ "type": "timestamp with time zone",
635
+ "primaryKey": false,
636
+ "notNull": false
637
+ },
638
+ "created_at": {
639
+ "name": "created_at",
640
+ "type": "timestamp with time zone",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "default": "now()"
644
+ }
645
+ },
646
+ "indexes": {
647
+ "auth_codes_user_purpose": {
648
+ "name": "auth_codes_user_purpose",
649
+ "columns": [
650
+ {
651
+ "expression": "user_id",
652
+ "isExpression": false,
653
+ "asc": true,
654
+ "nulls": "last"
655
+ },
656
+ {
657
+ "expression": "purpose",
658
+ "isExpression": false,
659
+ "asc": true,
660
+ "nulls": "last"
661
+ }
662
+ ],
663
+ "isUnique": false,
664
+ "concurrently": false,
665
+ "method": "btree",
666
+ "with": {}
667
+ }
668
+ },
669
+ "foreignKeys": {
670
+ "auth_codes_user_id_users_id_fk": {
671
+ "name": "auth_codes_user_id_users_id_fk",
672
+ "tableFrom": "auth_codes",
673
+ "tableTo": "users",
674
+ "columnsFrom": [
675
+ "user_id"
676
+ ],
677
+ "columnsTo": [
678
+ "id"
679
+ ],
680
+ "onDelete": "cascade",
681
+ "onUpdate": "no action"
682
+ }
683
+ },
684
+ "compositePrimaryKeys": {},
685
+ "uniqueConstraints": {},
686
+ "policies": {},
687
+ "checkConstraints": {},
688
+ "isRLSEnabled": false
689
+ },
690
+ "public.crm_contacts": {
691
+ "name": "crm_contacts",
692
+ "schema": "",
693
+ "columns": {
694
+ "id": {
695
+ "name": "id",
696
+ "type": "uuid",
697
+ "primaryKey": true,
698
+ "notNull": true,
699
+ "default": "gen_random_uuid()"
700
+ },
701
+ "name": {
702
+ "name": "name",
703
+ "type": "text",
704
+ "primaryKey": false,
705
+ "notNull": true
706
+ },
707
+ "org": {
708
+ "name": "org",
709
+ "type": "text",
710
+ "primaryKey": false,
711
+ "notNull": false
712
+ },
713
+ "contact": {
714
+ "name": "contact",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": false
718
+ },
719
+ "status": {
720
+ "name": "status",
721
+ "type": "text",
722
+ "primaryKey": false,
723
+ "notNull": true,
724
+ "default": "'lead'"
725
+ },
726
+ "source": {
727
+ "name": "source",
728
+ "type": "text",
729
+ "primaryKey": false,
730
+ "notNull": false
731
+ },
732
+ "notes": {
733
+ "name": "notes",
734
+ "type": "text",
735
+ "primaryKey": false,
736
+ "notNull": false
737
+ },
738
+ "next_action_at": {
739
+ "name": "next_action_at",
740
+ "type": "timestamp with time zone",
741
+ "primaryKey": false,
742
+ "notNull": false
743
+ },
744
+ "created_at": {
745
+ "name": "created_at",
746
+ "type": "timestamp with time zone",
747
+ "primaryKey": false,
748
+ "notNull": true,
749
+ "default": "now()"
750
+ },
751
+ "updated_at": {
752
+ "name": "updated_at",
753
+ "type": "timestamp with time zone",
754
+ "primaryKey": false,
755
+ "notNull": true,
756
+ "default": "now()"
757
+ }
758
+ },
759
+ "indexes": {},
760
+ "foreignKeys": {},
761
+ "compositePrimaryKeys": {},
762
+ "uniqueConstraints": {},
763
+ "policies": {},
764
+ "checkConstraints": {},
765
+ "isRLSEnabled": false
766
+ },
767
+ "public.debug_sessions": {
768
+ "name": "debug_sessions",
769
+ "schema": "",
770
+ "columns": {
771
+ "id": {
772
+ "name": "id",
773
+ "type": "uuid",
774
+ "primaryKey": true,
775
+ "notNull": true,
776
+ "default": "gen_random_uuid()"
777
+ },
778
+ "team_id": {
779
+ "name": "team_id",
780
+ "type": "uuid",
781
+ "primaryKey": false,
782
+ "notNull": true
783
+ },
784
+ "project_id": {
785
+ "name": "project_id",
786
+ "type": "uuid",
787
+ "primaryKey": false,
788
+ "notNull": false
789
+ },
790
+ "kind": {
791
+ "name": "kind",
792
+ "type": "text",
793
+ "primaryKey": false,
794
+ "notNull": true,
795
+ "default": "'debug'"
796
+ },
797
+ "title": {
798
+ "name": "title",
799
+ "type": "text",
800
+ "primaryKey": false,
801
+ "notNull": true
802
+ },
803
+ "status": {
804
+ "name": "status",
805
+ "type": "text",
806
+ "primaryKey": false,
807
+ "notNull": true,
808
+ "default": "'open'"
809
+ },
810
+ "opened_by": {
811
+ "name": "opened_by",
812
+ "type": "uuid",
813
+ "primaryKey": false,
814
+ "notNull": false
815
+ },
816
+ "context": {
817
+ "name": "context",
818
+ "type": "jsonb",
819
+ "primaryKey": false,
820
+ "notNull": false
821
+ },
822
+ "resolution": {
823
+ "name": "resolution",
824
+ "type": "jsonb",
825
+ "primaryKey": false,
826
+ "notNull": false
827
+ },
828
+ "created_at": {
829
+ "name": "created_at",
830
+ "type": "timestamp with time zone",
831
+ "primaryKey": false,
832
+ "notNull": true,
833
+ "default": "now()"
834
+ },
835
+ "resolved_at": {
836
+ "name": "resolved_at",
837
+ "type": "timestamp with time zone",
838
+ "primaryKey": false,
839
+ "notNull": false
840
+ }
841
+ },
842
+ "indexes": {
843
+ "debug_sessions_team_announcements": {
844
+ "name": "debug_sessions_team_announcements",
845
+ "columns": [
846
+ {
847
+ "expression": "team_id",
848
+ "isExpression": false,
849
+ "asc": true,
850
+ "nulls": "last"
851
+ }
852
+ ],
853
+ "isUnique": true,
854
+ "where": "kind = 'announcements'",
855
+ "concurrently": false,
856
+ "method": "btree",
857
+ "with": {}
858
+ }
859
+ },
860
+ "foreignKeys": {
861
+ "debug_sessions_team_id_teams_id_fk": {
862
+ "name": "debug_sessions_team_id_teams_id_fk",
863
+ "tableFrom": "debug_sessions",
864
+ "tableTo": "teams",
865
+ "columnsFrom": [
866
+ "team_id"
867
+ ],
868
+ "columnsTo": [
869
+ "id"
870
+ ],
871
+ "onDelete": "cascade",
872
+ "onUpdate": "no action"
873
+ },
874
+ "debug_sessions_project_id_projects_id_fk": {
875
+ "name": "debug_sessions_project_id_projects_id_fk",
876
+ "tableFrom": "debug_sessions",
877
+ "tableTo": "projects",
878
+ "columnsFrom": [
879
+ "project_id"
880
+ ],
881
+ "columnsTo": [
882
+ "id"
883
+ ],
884
+ "onDelete": "set null",
885
+ "onUpdate": "no action"
886
+ },
887
+ "debug_sessions_opened_by_users_id_fk": {
888
+ "name": "debug_sessions_opened_by_users_id_fk",
889
+ "tableFrom": "debug_sessions",
890
+ "tableTo": "users",
891
+ "columnsFrom": [
892
+ "opened_by"
893
+ ],
894
+ "columnsTo": [
895
+ "id"
896
+ ],
897
+ "onDelete": "no action",
898
+ "onUpdate": "no action"
899
+ }
900
+ },
901
+ "compositePrimaryKeys": {},
902
+ "uniqueConstraints": {},
903
+ "policies": {},
904
+ "checkConstraints": {},
905
+ "isRLSEnabled": false
906
+ },
907
+ "public.delivery_flows": {
908
+ "name": "delivery_flows",
909
+ "schema": "",
910
+ "columns": {
911
+ "id": {
912
+ "name": "id",
913
+ "type": "uuid",
914
+ "primaryKey": true,
915
+ "notNull": true,
916
+ "default": "gen_random_uuid()"
917
+ },
918
+ "team_id": {
919
+ "name": "team_id",
920
+ "type": "uuid",
921
+ "primaryKey": false,
922
+ "notNull": true
923
+ },
924
+ "project_id": {
925
+ "name": "project_id",
926
+ "type": "uuid",
927
+ "primaryKey": false,
928
+ "notNull": false
929
+ },
930
+ "name": {
931
+ "name": "name",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true
935
+ },
936
+ "template_key": {
937
+ "name": "template_key",
938
+ "type": "text",
939
+ "primaryKey": false,
940
+ "notNull": true
941
+ },
942
+ "provider": {
943
+ "name": "provider",
944
+ "type": "text",
945
+ "primaryKey": false,
946
+ "notNull": true,
947
+ "default": "'azure-devops'"
948
+ },
949
+ "document": {
950
+ "name": "document",
951
+ "type": "jsonb",
952
+ "primaryKey": false,
953
+ "notNull": true
954
+ },
955
+ "status": {
956
+ "name": "status",
957
+ "type": "text",
958
+ "primaryKey": false,
959
+ "notNull": true,
960
+ "default": "'active'"
961
+ },
962
+ "version": {
963
+ "name": "version",
964
+ "type": "integer",
965
+ "primaryKey": false,
966
+ "notNull": true,
967
+ "default": 1
968
+ },
969
+ "created_by": {
970
+ "name": "created_by",
971
+ "type": "uuid",
972
+ "primaryKey": false,
973
+ "notNull": false
974
+ },
975
+ "created_at": {
976
+ "name": "created_at",
977
+ "type": "timestamp with time zone",
978
+ "primaryKey": false,
979
+ "notNull": true,
980
+ "default": "now()"
981
+ },
982
+ "updated_at": {
983
+ "name": "updated_at",
984
+ "type": "timestamp with time zone",
985
+ "primaryKey": false,
986
+ "notNull": true,
987
+ "default": "now()"
988
+ }
989
+ },
990
+ "indexes": {
991
+ "delivery_flows_team": {
992
+ "name": "delivery_flows_team",
993
+ "columns": [
994
+ {
995
+ "expression": "team_id",
996
+ "isExpression": false,
997
+ "asc": true,
998
+ "nulls": "last"
999
+ },
1000
+ {
1001
+ "expression": "status",
1002
+ "isExpression": false,
1003
+ "asc": true,
1004
+ "nulls": "last"
1005
+ }
1006
+ ],
1007
+ "isUnique": false,
1008
+ "concurrently": false,
1009
+ "method": "btree",
1010
+ "with": {}
1011
+ }
1012
+ },
1013
+ "foreignKeys": {
1014
+ "delivery_flows_team_id_teams_id_fk": {
1015
+ "name": "delivery_flows_team_id_teams_id_fk",
1016
+ "tableFrom": "delivery_flows",
1017
+ "tableTo": "teams",
1018
+ "columnsFrom": [
1019
+ "team_id"
1020
+ ],
1021
+ "columnsTo": [
1022
+ "id"
1023
+ ],
1024
+ "onDelete": "cascade",
1025
+ "onUpdate": "no action"
1026
+ },
1027
+ "delivery_flows_project_id_projects_id_fk": {
1028
+ "name": "delivery_flows_project_id_projects_id_fk",
1029
+ "tableFrom": "delivery_flows",
1030
+ "tableTo": "projects",
1031
+ "columnsFrom": [
1032
+ "project_id"
1033
+ ],
1034
+ "columnsTo": [
1035
+ "id"
1036
+ ],
1037
+ "onDelete": "set null",
1038
+ "onUpdate": "no action"
1039
+ },
1040
+ "delivery_flows_created_by_users_id_fk": {
1041
+ "name": "delivery_flows_created_by_users_id_fk",
1042
+ "tableFrom": "delivery_flows",
1043
+ "tableTo": "users",
1044
+ "columnsFrom": [
1045
+ "created_by"
1046
+ ],
1047
+ "columnsTo": [
1048
+ "id"
1049
+ ],
1050
+ "onDelete": "set null",
1051
+ "onUpdate": "no action"
1052
+ }
1053
+ },
1054
+ "compositePrimaryKeys": {},
1055
+ "uniqueConstraints": {},
1056
+ "policies": {},
1057
+ "checkConstraints": {},
1058
+ "isRLSEnabled": false
1059
+ },
1060
+ "public.environment_baselines": {
1061
+ "name": "environment_baselines",
1062
+ "schema": "",
1063
+ "columns": {
1064
+ "id": {
1065
+ "name": "id",
1066
+ "type": "uuid",
1067
+ "primaryKey": true,
1068
+ "notNull": true,
1069
+ "default": "gen_random_uuid()"
1070
+ },
1071
+ "team_id": {
1072
+ "name": "team_id",
1073
+ "type": "uuid",
1074
+ "primaryKey": false,
1075
+ "notNull": true
1076
+ },
1077
+ "project_id": {
1078
+ "name": "project_id",
1079
+ "type": "uuid",
1080
+ "primaryKey": false,
1081
+ "notNull": true
1082
+ },
1083
+ "data": {
1084
+ "name": "data",
1085
+ "type": "jsonb",
1086
+ "primaryKey": false,
1087
+ "notNull": true
1088
+ },
1089
+ "fingerprint": {
1090
+ "name": "fingerprint",
1091
+ "type": "text",
1092
+ "primaryKey": false,
1093
+ "notNull": true
1094
+ },
1095
+ "active": {
1096
+ "name": "active",
1097
+ "type": "boolean",
1098
+ "primaryKey": false,
1099
+ "notNull": true,
1100
+ "default": true
1101
+ },
1102
+ "created_by": {
1103
+ "name": "created_by",
1104
+ "type": "uuid",
1105
+ "primaryKey": false,
1106
+ "notNull": false
1107
+ },
1108
+ "created_at": {
1109
+ "name": "created_at",
1110
+ "type": "timestamp with time zone",
1111
+ "primaryKey": false,
1112
+ "notNull": true,
1113
+ "default": "now()"
1114
+ }
1115
+ },
1116
+ "indexes": {
1117
+ "environment_baselines_project_active": {
1118
+ "name": "environment_baselines_project_active",
1119
+ "columns": [
1120
+ {
1121
+ "expression": "project_id",
1122
+ "isExpression": false,
1123
+ "asc": true,
1124
+ "nulls": "last"
1125
+ },
1126
+ {
1127
+ "expression": "active",
1128
+ "isExpression": false,
1129
+ "asc": true,
1130
+ "nulls": "last"
1131
+ },
1132
+ {
1133
+ "expression": "created_at",
1134
+ "isExpression": false,
1135
+ "asc": true,
1136
+ "nulls": "last"
1137
+ }
1138
+ ],
1139
+ "isUnique": false,
1140
+ "concurrently": false,
1141
+ "method": "btree",
1142
+ "with": {}
1143
+ }
1144
+ },
1145
+ "foreignKeys": {
1146
+ "environment_baselines_team_id_teams_id_fk": {
1147
+ "name": "environment_baselines_team_id_teams_id_fk",
1148
+ "tableFrom": "environment_baselines",
1149
+ "tableTo": "teams",
1150
+ "columnsFrom": [
1151
+ "team_id"
1152
+ ],
1153
+ "columnsTo": [
1154
+ "id"
1155
+ ],
1156
+ "onDelete": "cascade",
1157
+ "onUpdate": "no action"
1158
+ },
1159
+ "environment_baselines_project_id_projects_id_fk": {
1160
+ "name": "environment_baselines_project_id_projects_id_fk",
1161
+ "tableFrom": "environment_baselines",
1162
+ "tableTo": "projects",
1163
+ "columnsFrom": [
1164
+ "project_id"
1165
+ ],
1166
+ "columnsTo": [
1167
+ "id"
1168
+ ],
1169
+ "onDelete": "cascade",
1170
+ "onUpdate": "no action"
1171
+ },
1172
+ "environment_baselines_created_by_users_id_fk": {
1173
+ "name": "environment_baselines_created_by_users_id_fk",
1174
+ "tableFrom": "environment_baselines",
1175
+ "tableTo": "users",
1176
+ "columnsFrom": [
1177
+ "created_by"
1178
+ ],
1179
+ "columnsTo": [
1180
+ "id"
1181
+ ],
1182
+ "onDelete": "set null",
1183
+ "onUpdate": "no action"
1184
+ }
1185
+ },
1186
+ "compositePrimaryKeys": {},
1187
+ "uniqueConstraints": {},
1188
+ "policies": {},
1189
+ "checkConstraints": {},
1190
+ "isRLSEnabled": false
1191
+ },
1192
+ "public.environment_checks": {
1193
+ "name": "environment_checks",
1194
+ "schema": "",
1195
+ "columns": {
1196
+ "id": {
1197
+ "name": "id",
1198
+ "type": "uuid",
1199
+ "primaryKey": true,
1200
+ "notNull": true,
1201
+ "default": "gen_random_uuid()"
1202
+ },
1203
+ "team_id": {
1204
+ "name": "team_id",
1205
+ "type": "uuid",
1206
+ "primaryKey": false,
1207
+ "notNull": true
1208
+ },
1209
+ "project_id": {
1210
+ "name": "project_id",
1211
+ "type": "uuid",
1212
+ "primaryKey": false,
1213
+ "notNull": true
1214
+ },
1215
+ "user_id": {
1216
+ "name": "user_id",
1217
+ "type": "uuid",
1218
+ "primaryKey": false,
1219
+ "notNull": false
1220
+ },
1221
+ "run_id": {
1222
+ "name": "run_id",
1223
+ "type": "uuid",
1224
+ "primaryKey": false,
1225
+ "notNull": false
1226
+ },
1227
+ "status": {
1228
+ "name": "status",
1229
+ "type": "text",
1230
+ "primaryKey": false,
1231
+ "notNull": true
1232
+ },
1233
+ "fingerprint": {
1234
+ "name": "fingerprint",
1235
+ "type": "text",
1236
+ "primaryKey": false,
1237
+ "notNull": true
1238
+ },
1239
+ "baseline_fingerprint": {
1240
+ "name": "baseline_fingerprint",
1241
+ "type": "text",
1242
+ "primaryKey": false,
1243
+ "notNull": false
1244
+ },
1245
+ "summary": {
1246
+ "name": "summary",
1247
+ "type": "text",
1248
+ "primaryKey": false,
1249
+ "notNull": false
1250
+ },
1251
+ "details": {
1252
+ "name": "details",
1253
+ "type": "jsonb",
1254
+ "primaryKey": false,
1255
+ "notNull": false
1256
+ },
1257
+ "created_at": {
1258
+ "name": "created_at",
1259
+ "type": "timestamp with time zone",
1260
+ "primaryKey": false,
1261
+ "notNull": true,
1262
+ "default": "now()"
1263
+ }
1264
+ },
1265
+ "indexes": {
1266
+ "environment_checks_team_created": {
1267
+ "name": "environment_checks_team_created",
1268
+ "columns": [
1269
+ {
1270
+ "expression": "team_id",
1271
+ "isExpression": false,
1272
+ "asc": true,
1273
+ "nulls": "last"
1274
+ },
1275
+ {
1276
+ "expression": "created_at",
1277
+ "isExpression": false,
1278
+ "asc": true,
1279
+ "nulls": "last"
1280
+ }
1281
+ ],
1282
+ "isUnique": false,
1283
+ "concurrently": false,
1284
+ "method": "btree",
1285
+ "with": {}
1286
+ },
1287
+ "environment_checks_project_created": {
1288
+ "name": "environment_checks_project_created",
1289
+ "columns": [
1290
+ {
1291
+ "expression": "project_id",
1292
+ "isExpression": false,
1293
+ "asc": true,
1294
+ "nulls": "last"
1295
+ },
1296
+ {
1297
+ "expression": "created_at",
1298
+ "isExpression": false,
1299
+ "asc": true,
1300
+ "nulls": "last"
1301
+ }
1302
+ ],
1303
+ "isUnique": false,
1304
+ "concurrently": false,
1305
+ "method": "btree",
1306
+ "with": {}
1307
+ }
1308
+ },
1309
+ "foreignKeys": {
1310
+ "environment_checks_team_id_teams_id_fk": {
1311
+ "name": "environment_checks_team_id_teams_id_fk",
1312
+ "tableFrom": "environment_checks",
1313
+ "tableTo": "teams",
1314
+ "columnsFrom": [
1315
+ "team_id"
1316
+ ],
1317
+ "columnsTo": [
1318
+ "id"
1319
+ ],
1320
+ "onDelete": "cascade",
1321
+ "onUpdate": "no action"
1322
+ },
1323
+ "environment_checks_project_id_projects_id_fk": {
1324
+ "name": "environment_checks_project_id_projects_id_fk",
1325
+ "tableFrom": "environment_checks",
1326
+ "tableTo": "projects",
1327
+ "columnsFrom": [
1328
+ "project_id"
1329
+ ],
1330
+ "columnsTo": [
1331
+ "id"
1332
+ ],
1333
+ "onDelete": "cascade",
1334
+ "onUpdate": "no action"
1335
+ },
1336
+ "environment_checks_user_id_users_id_fk": {
1337
+ "name": "environment_checks_user_id_users_id_fk",
1338
+ "tableFrom": "environment_checks",
1339
+ "tableTo": "users",
1340
+ "columnsFrom": [
1341
+ "user_id"
1342
+ ],
1343
+ "columnsTo": [
1344
+ "id"
1345
+ ],
1346
+ "onDelete": "set null",
1347
+ "onUpdate": "no action"
1348
+ },
1349
+ "environment_checks_run_id_agent_runs_id_fk": {
1350
+ "name": "environment_checks_run_id_agent_runs_id_fk",
1351
+ "tableFrom": "environment_checks",
1352
+ "tableTo": "agent_runs",
1353
+ "columnsFrom": [
1354
+ "run_id"
1355
+ ],
1356
+ "columnsTo": [
1357
+ "id"
1358
+ ],
1359
+ "onDelete": "set null",
1360
+ "onUpdate": "no action"
1361
+ }
1362
+ },
1363
+ "compositePrimaryKeys": {},
1364
+ "uniqueConstraints": {},
1365
+ "policies": {},
1366
+ "checkConstraints": {},
1367
+ "isRLSEnabled": false
1368
+ },
1369
+ "public.error_events": {
1370
+ "name": "error_events",
1371
+ "schema": "",
1372
+ "columns": {
1373
+ "id": {
1374
+ "name": "id",
1375
+ "type": "uuid",
1376
+ "primaryKey": true,
1377
+ "notNull": true,
1378
+ "default": "gen_random_uuid()"
1379
+ },
1380
+ "at": {
1381
+ "name": "at",
1382
+ "type": "timestamp with time zone",
1383
+ "primaryKey": false,
1384
+ "notNull": true,
1385
+ "default": "now()"
1386
+ },
1387
+ "kind": {
1388
+ "name": "kind",
1389
+ "type": "text",
1390
+ "primaryKey": false,
1391
+ "notNull": true,
1392
+ "default": "'http'"
1393
+ },
1394
+ "method": {
1395
+ "name": "method",
1396
+ "type": "text",
1397
+ "primaryKey": false,
1398
+ "notNull": false
1399
+ },
1400
+ "path": {
1401
+ "name": "path",
1402
+ "type": "text",
1403
+ "primaryKey": false,
1404
+ "notNull": false
1405
+ },
1406
+ "status": {
1407
+ "name": "status",
1408
+ "type": "integer",
1409
+ "primaryKey": false,
1410
+ "notNull": false
1411
+ },
1412
+ "message": {
1413
+ "name": "message",
1414
+ "type": "text",
1415
+ "primaryKey": false,
1416
+ "notNull": true
1417
+ },
1418
+ "stack": {
1419
+ "name": "stack",
1420
+ "type": "text",
1421
+ "primaryKey": false,
1422
+ "notNull": false
1423
+ },
1424
+ "user_id": {
1425
+ "name": "user_id",
1426
+ "type": "text",
1427
+ "primaryKey": false,
1428
+ "notNull": false
1429
+ },
1430
+ "team_slug": {
1431
+ "name": "team_slug",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": false
1435
+ },
1436
+ "request_id": {
1437
+ "name": "request_id",
1438
+ "type": "text",
1439
+ "primaryKey": false,
1440
+ "notNull": false
1441
+ }
1442
+ },
1443
+ "indexes": {
1444
+ "error_events_at": {
1445
+ "name": "error_events_at",
1446
+ "columns": [
1447
+ {
1448
+ "expression": "at",
1449
+ "isExpression": false,
1450
+ "asc": false,
1451
+ "nulls": "last"
1452
+ }
1453
+ ],
1454
+ "isUnique": false,
1455
+ "concurrently": false,
1456
+ "method": "btree",
1457
+ "with": {}
1458
+ }
1459
+ },
1460
+ "foreignKeys": {},
1461
+ "compositePrimaryKeys": {},
1462
+ "uniqueConstraints": {},
1463
+ "policies": {},
1464
+ "checkConstraints": {},
1465
+ "isRLSEnabled": false
1466
+ },
1467
+ "public.invites": {
1468
+ "name": "invites",
1469
+ "schema": "",
1470
+ "columns": {
1471
+ "id": {
1472
+ "name": "id",
1473
+ "type": "uuid",
1474
+ "primaryKey": true,
1475
+ "notNull": true,
1476
+ "default": "gen_random_uuid()"
1477
+ },
1478
+ "team_id": {
1479
+ "name": "team_id",
1480
+ "type": "uuid",
1481
+ "primaryKey": false,
1482
+ "notNull": true
1483
+ },
1484
+ "code": {
1485
+ "name": "code",
1486
+ "type": "text",
1487
+ "primaryKey": false,
1488
+ "notNull": true
1489
+ },
1490
+ "created_by": {
1491
+ "name": "created_by",
1492
+ "type": "uuid",
1493
+ "primaryKey": false,
1494
+ "notNull": false
1495
+ },
1496
+ "expires_at": {
1497
+ "name": "expires_at",
1498
+ "type": "timestamp with time zone",
1499
+ "primaryKey": false,
1500
+ "notNull": true
1501
+ },
1502
+ "uses": {
1503
+ "name": "uses",
1504
+ "type": "integer",
1505
+ "primaryKey": false,
1506
+ "notNull": true,
1507
+ "default": 0
1508
+ },
1509
+ "max_uses": {
1510
+ "name": "max_uses",
1511
+ "type": "integer",
1512
+ "primaryKey": false,
1513
+ "notNull": false
1514
+ },
1515
+ "created_at": {
1516
+ "name": "created_at",
1517
+ "type": "timestamp with time zone",
1518
+ "primaryKey": false,
1519
+ "notNull": true,
1520
+ "default": "now()"
1521
+ }
1522
+ },
1523
+ "indexes": {},
1524
+ "foreignKeys": {
1525
+ "invites_team_id_teams_id_fk": {
1526
+ "name": "invites_team_id_teams_id_fk",
1527
+ "tableFrom": "invites",
1528
+ "tableTo": "teams",
1529
+ "columnsFrom": [
1530
+ "team_id"
1531
+ ],
1532
+ "columnsTo": [
1533
+ "id"
1534
+ ],
1535
+ "onDelete": "cascade",
1536
+ "onUpdate": "no action"
1537
+ },
1538
+ "invites_created_by_users_id_fk": {
1539
+ "name": "invites_created_by_users_id_fk",
1540
+ "tableFrom": "invites",
1541
+ "tableTo": "users",
1542
+ "columnsFrom": [
1543
+ "created_by"
1544
+ ],
1545
+ "columnsTo": [
1546
+ "id"
1547
+ ],
1548
+ "onDelete": "no action",
1549
+ "onUpdate": "no action"
1550
+ }
1551
+ },
1552
+ "compositePrimaryKeys": {},
1553
+ "uniqueConstraints": {
1554
+ "invites_code_unique": {
1555
+ "name": "invites_code_unique",
1556
+ "nullsNotDistinct": false,
1557
+ "columns": [
1558
+ "code"
1559
+ ]
1560
+ }
1561
+ },
1562
+ "policies": {},
1563
+ "checkConstraints": {},
1564
+ "isRLSEnabled": false
1565
+ },
1566
+ "public.memberships": {
1567
+ "name": "memberships",
1568
+ "schema": "",
1569
+ "columns": {
1570
+ "team_id": {
1571
+ "name": "team_id",
1572
+ "type": "uuid",
1573
+ "primaryKey": false,
1574
+ "notNull": true
1575
+ },
1576
+ "user_id": {
1577
+ "name": "user_id",
1578
+ "type": "uuid",
1579
+ "primaryKey": false,
1580
+ "notNull": true
1581
+ },
1582
+ "role": {
1583
+ "name": "role",
1584
+ "type": "text",
1585
+ "primaryKey": false,
1586
+ "notNull": true,
1587
+ "default": "'member'"
1588
+ },
1589
+ "created_at": {
1590
+ "name": "created_at",
1591
+ "type": "timestamp with time zone",
1592
+ "primaryKey": false,
1593
+ "notNull": true,
1594
+ "default": "now()"
1595
+ }
1596
+ },
1597
+ "indexes": {},
1598
+ "foreignKeys": {
1599
+ "memberships_team_id_teams_id_fk": {
1600
+ "name": "memberships_team_id_teams_id_fk",
1601
+ "tableFrom": "memberships",
1602
+ "tableTo": "teams",
1603
+ "columnsFrom": [
1604
+ "team_id"
1605
+ ],
1606
+ "columnsTo": [
1607
+ "id"
1608
+ ],
1609
+ "onDelete": "cascade",
1610
+ "onUpdate": "no action"
1611
+ },
1612
+ "memberships_user_id_users_id_fk": {
1613
+ "name": "memberships_user_id_users_id_fk",
1614
+ "tableFrom": "memberships",
1615
+ "tableTo": "users",
1616
+ "columnsFrom": [
1617
+ "user_id"
1618
+ ],
1619
+ "columnsTo": [
1620
+ "id"
1621
+ ],
1622
+ "onDelete": "cascade",
1623
+ "onUpdate": "no action"
1624
+ }
1625
+ },
1626
+ "compositePrimaryKeys": {
1627
+ "memberships_team_id_user_id_pk": {
1628
+ "name": "memberships_team_id_user_id_pk",
1629
+ "columns": [
1630
+ "team_id",
1631
+ "user_id"
1632
+ ]
1633
+ }
1634
+ },
1635
+ "uniqueConstraints": {},
1636
+ "policies": {},
1637
+ "checkConstraints": {},
1638
+ "isRLSEnabled": false
1639
+ },
1640
+ "public.messages": {
1641
+ "name": "messages",
1642
+ "schema": "",
1643
+ "columns": {
1644
+ "id": {
1645
+ "name": "id",
1646
+ "type": "uuid",
1647
+ "primaryKey": true,
1648
+ "notNull": true,
1649
+ "default": "gen_random_uuid()"
1650
+ },
1651
+ "session_id": {
1652
+ "name": "session_id",
1653
+ "type": "uuid",
1654
+ "primaryKey": false,
1655
+ "notNull": true
1656
+ },
1657
+ "author_id": {
1658
+ "name": "author_id",
1659
+ "type": "uuid",
1660
+ "primaryKey": false,
1661
+ "notNull": false
1662
+ },
1663
+ "token_id": {
1664
+ "name": "token_id",
1665
+ "type": "uuid",
1666
+ "primaryKey": false,
1667
+ "notNull": false
1668
+ },
1669
+ "kind": {
1670
+ "name": "kind",
1671
+ "type": "text",
1672
+ "primaryKey": false,
1673
+ "notNull": true,
1674
+ "default": "'note'"
1675
+ },
1676
+ "via": {
1677
+ "name": "via",
1678
+ "type": "text",
1679
+ "primaryKey": false,
1680
+ "notNull": false
1681
+ },
1682
+ "body": {
1683
+ "name": "body",
1684
+ "type": "text",
1685
+ "primaryKey": false,
1686
+ "notNull": true
1687
+ },
1688
+ "attachments": {
1689
+ "name": "attachments",
1690
+ "type": "jsonb",
1691
+ "primaryKey": false,
1692
+ "notNull": false
1693
+ },
1694
+ "payload": {
1695
+ "name": "payload",
1696
+ "type": "jsonb",
1697
+ "primaryKey": false,
1698
+ "notNull": false
1699
+ },
1700
+ "created_at": {
1701
+ "name": "created_at",
1702
+ "type": "timestamp with time zone",
1703
+ "primaryKey": false,
1704
+ "notNull": true,
1705
+ "default": "now()"
1706
+ }
1707
+ },
1708
+ "indexes": {
1709
+ "messages_session_created": {
1710
+ "name": "messages_session_created",
1711
+ "columns": [
1712
+ {
1713
+ "expression": "session_id",
1714
+ "isExpression": false,
1715
+ "asc": true,
1716
+ "nulls": "last"
1717
+ },
1718
+ {
1719
+ "expression": "created_at",
1720
+ "isExpression": false,
1721
+ "asc": true,
1722
+ "nulls": "last"
1723
+ }
1724
+ ],
1725
+ "isUnique": false,
1726
+ "concurrently": false,
1727
+ "method": "btree",
1728
+ "with": {}
1729
+ }
1730
+ },
1731
+ "foreignKeys": {
1732
+ "messages_session_id_debug_sessions_id_fk": {
1733
+ "name": "messages_session_id_debug_sessions_id_fk",
1734
+ "tableFrom": "messages",
1735
+ "tableTo": "debug_sessions",
1736
+ "columnsFrom": [
1737
+ "session_id"
1738
+ ],
1739
+ "columnsTo": [
1740
+ "id"
1741
+ ],
1742
+ "onDelete": "cascade",
1743
+ "onUpdate": "no action"
1744
+ },
1745
+ "messages_author_id_users_id_fk": {
1746
+ "name": "messages_author_id_users_id_fk",
1747
+ "tableFrom": "messages",
1748
+ "tableTo": "users",
1749
+ "columnsFrom": [
1750
+ "author_id"
1751
+ ],
1752
+ "columnsTo": [
1753
+ "id"
1754
+ ],
1755
+ "onDelete": "no action",
1756
+ "onUpdate": "no action"
1757
+ },
1758
+ "messages_token_id_tokens_id_fk": {
1759
+ "name": "messages_token_id_tokens_id_fk",
1760
+ "tableFrom": "messages",
1761
+ "tableTo": "tokens",
1762
+ "columnsFrom": [
1763
+ "token_id"
1764
+ ],
1765
+ "columnsTo": [
1766
+ "id"
1767
+ ],
1768
+ "onDelete": "set null",
1769
+ "onUpdate": "no action"
1770
+ }
1771
+ },
1772
+ "compositePrimaryKeys": {},
1773
+ "uniqueConstraints": {},
1774
+ "policies": {},
1775
+ "checkConstraints": {},
1776
+ "isRLSEnabled": false
1777
+ },
1778
+ "public.notification_prefs": {
1779
+ "name": "notification_prefs",
1780
+ "schema": "",
1781
+ "columns": {
1782
+ "user_id": {
1783
+ "name": "user_id",
1784
+ "type": "uuid",
1785
+ "primaryKey": true,
1786
+ "notNull": true
1787
+ },
1788
+ "session_reply": {
1789
+ "name": "session_reply",
1790
+ "type": "boolean",
1791
+ "primaryKey": false,
1792
+ "notNull": true,
1793
+ "default": true
1794
+ },
1795
+ "session_resolved": {
1796
+ "name": "session_resolved",
1797
+ "type": "boolean",
1798
+ "primaryKey": false,
1799
+ "notNull": true,
1800
+ "default": true
1801
+ },
1802
+ "team_joined": {
1803
+ "name": "team_joined",
1804
+ "type": "boolean",
1805
+ "primaryKey": false,
1806
+ "notNull": true,
1807
+ "default": true
1808
+ },
1809
+ "announcements": {
1810
+ "name": "announcements",
1811
+ "type": "boolean",
1812
+ "primaryKey": false,
1813
+ "notNull": true,
1814
+ "default": false
1815
+ },
1816
+ "webhook_url": {
1817
+ "name": "webhook_url",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": false
1821
+ },
1822
+ "updated_at": {
1823
+ "name": "updated_at",
1824
+ "type": "timestamp with time zone",
1825
+ "primaryKey": false,
1826
+ "notNull": true,
1827
+ "default": "now()"
1828
+ }
1829
+ },
1830
+ "indexes": {},
1831
+ "foreignKeys": {
1832
+ "notification_prefs_user_id_users_id_fk": {
1833
+ "name": "notification_prefs_user_id_users_id_fk",
1834
+ "tableFrom": "notification_prefs",
1835
+ "tableTo": "users",
1836
+ "columnsFrom": [
1837
+ "user_id"
1838
+ ],
1839
+ "columnsTo": [
1840
+ "id"
1841
+ ],
1842
+ "onDelete": "cascade",
1843
+ "onUpdate": "no action"
1844
+ }
1845
+ },
1846
+ "compositePrimaryKeys": {},
1847
+ "uniqueConstraints": {},
1848
+ "policies": {},
1849
+ "checkConstraints": {},
1850
+ "isRLSEnabled": false
1851
+ },
1852
+ "public.notification_queue": {
1853
+ "name": "notification_queue",
1854
+ "schema": "",
1855
+ "columns": {
1856
+ "id": {
1857
+ "name": "id",
1858
+ "type": "uuid",
1859
+ "primaryKey": true,
1860
+ "notNull": true,
1861
+ "default": "gen_random_uuid()"
1862
+ },
1863
+ "user_id": {
1864
+ "name": "user_id",
1865
+ "type": "uuid",
1866
+ "primaryKey": false,
1867
+ "notNull": true
1868
+ },
1869
+ "kind": {
1870
+ "name": "kind",
1871
+ "type": "text",
1872
+ "primaryKey": false,
1873
+ "notNull": true
1874
+ },
1875
+ "coalesce_key": {
1876
+ "name": "coalesce_key",
1877
+ "type": "text",
1878
+ "primaryKey": false,
1879
+ "notNull": true
1880
+ },
1881
+ "team_id": {
1882
+ "name": "team_id",
1883
+ "type": "uuid",
1884
+ "primaryKey": false,
1885
+ "notNull": false
1886
+ },
1887
+ "session_id": {
1888
+ "name": "session_id",
1889
+ "type": "uuid",
1890
+ "primaryKey": false,
1891
+ "notNull": false
1892
+ },
1893
+ "since_at": {
1894
+ "name": "since_at",
1895
+ "type": "timestamp with time zone",
1896
+ "primaryKey": false,
1897
+ "notNull": true,
1898
+ "default": "now()"
1899
+ },
1900
+ "not_before": {
1901
+ "name": "not_before",
1902
+ "type": "timestamp with time zone",
1903
+ "primaryKey": false,
1904
+ "notNull": true
1905
+ },
1906
+ "status": {
1907
+ "name": "status",
1908
+ "type": "text",
1909
+ "primaryKey": false,
1910
+ "notNull": true,
1911
+ "default": "'pending'"
1912
+ },
1913
+ "reason": {
1914
+ "name": "reason",
1915
+ "type": "text",
1916
+ "primaryKey": false,
1917
+ "notNull": false
1918
+ },
1919
+ "sent_at": {
1920
+ "name": "sent_at",
1921
+ "type": "timestamp with time zone",
1922
+ "primaryKey": false,
1923
+ "notNull": false
1924
+ },
1925
+ "created_at": {
1926
+ "name": "created_at",
1927
+ "type": "timestamp with time zone",
1928
+ "primaryKey": false,
1929
+ "notNull": true,
1930
+ "default": "now()"
1931
+ }
1932
+ },
1933
+ "indexes": {
1934
+ "notification_queue_pending": {
1935
+ "name": "notification_queue_pending",
1936
+ "columns": [
1937
+ {
1938
+ "expression": "user_id",
1939
+ "isExpression": false,
1940
+ "asc": true,
1941
+ "nulls": "last"
1942
+ },
1943
+ {
1944
+ "expression": "coalesce_key",
1945
+ "isExpression": false,
1946
+ "asc": true,
1947
+ "nulls": "last"
1948
+ }
1949
+ ],
1950
+ "isUnique": true,
1951
+ "where": "status = 'pending'",
1952
+ "concurrently": false,
1953
+ "method": "btree",
1954
+ "with": {}
1955
+ },
1956
+ "notification_queue_due": {
1957
+ "name": "notification_queue_due",
1958
+ "columns": [
1959
+ {
1960
+ "expression": "status",
1961
+ "isExpression": false,
1962
+ "asc": true,
1963
+ "nulls": "last"
1964
+ },
1965
+ {
1966
+ "expression": "not_before",
1967
+ "isExpression": false,
1968
+ "asc": true,
1969
+ "nulls": "last"
1970
+ }
1971
+ ],
1972
+ "isUnique": false,
1973
+ "concurrently": false,
1974
+ "method": "btree",
1975
+ "with": {}
1976
+ },
1977
+ "notification_queue_user_sent": {
1978
+ "name": "notification_queue_user_sent",
1979
+ "columns": [
1980
+ {
1981
+ "expression": "user_id",
1982
+ "isExpression": false,
1983
+ "asc": true,
1984
+ "nulls": "last"
1985
+ },
1986
+ {
1987
+ "expression": "sent_at",
1988
+ "isExpression": false,
1989
+ "asc": true,
1990
+ "nulls": "last"
1991
+ }
1992
+ ],
1993
+ "isUnique": false,
1994
+ "concurrently": false,
1995
+ "method": "btree",
1996
+ "with": {}
1997
+ }
1998
+ },
1999
+ "foreignKeys": {
2000
+ "notification_queue_user_id_users_id_fk": {
2001
+ "name": "notification_queue_user_id_users_id_fk",
2002
+ "tableFrom": "notification_queue",
2003
+ "tableTo": "users",
2004
+ "columnsFrom": [
2005
+ "user_id"
2006
+ ],
2007
+ "columnsTo": [
2008
+ "id"
2009
+ ],
2010
+ "onDelete": "cascade",
2011
+ "onUpdate": "no action"
2012
+ },
2013
+ "notification_queue_team_id_teams_id_fk": {
2014
+ "name": "notification_queue_team_id_teams_id_fk",
2015
+ "tableFrom": "notification_queue",
2016
+ "tableTo": "teams",
2017
+ "columnsFrom": [
2018
+ "team_id"
2019
+ ],
2020
+ "columnsTo": [
2021
+ "id"
2022
+ ],
2023
+ "onDelete": "cascade",
2024
+ "onUpdate": "no action"
2025
+ },
2026
+ "notification_queue_session_id_debug_sessions_id_fk": {
2027
+ "name": "notification_queue_session_id_debug_sessions_id_fk",
2028
+ "tableFrom": "notification_queue",
2029
+ "tableTo": "debug_sessions",
2030
+ "columnsFrom": [
2031
+ "session_id"
2032
+ ],
2033
+ "columnsTo": [
2034
+ "id"
2035
+ ],
2036
+ "onDelete": "cascade",
2037
+ "onUpdate": "no action"
2038
+ }
2039
+ },
2040
+ "compositePrimaryKeys": {},
2041
+ "uniqueConstraints": {},
2042
+ "policies": {},
2043
+ "checkConstraints": {},
2044
+ "isRLSEnabled": false
2045
+ },
2046
+ "public.policy_bundles": {
2047
+ "name": "policy_bundles",
2048
+ "schema": "",
2049
+ "columns": {
2050
+ "id": {
2051
+ "name": "id",
2052
+ "type": "uuid",
2053
+ "primaryKey": true,
2054
+ "notNull": true,
2055
+ "default": "gen_random_uuid()"
2056
+ },
2057
+ "team_id": {
2058
+ "name": "team_id",
2059
+ "type": "uuid",
2060
+ "primaryKey": false,
2061
+ "notNull": true
2062
+ },
2063
+ "project_id": {
2064
+ "name": "project_id",
2065
+ "type": "uuid",
2066
+ "primaryKey": false,
2067
+ "notNull": false
2068
+ },
2069
+ "scope_key": {
2070
+ "name": "scope_key",
2071
+ "type": "text",
2072
+ "primaryKey": false,
2073
+ "notNull": true
2074
+ },
2075
+ "version": {
2076
+ "name": "version",
2077
+ "type": "integer",
2078
+ "primaryKey": false,
2079
+ "notNull": true
2080
+ },
2081
+ "status": {
2082
+ "name": "status",
2083
+ "type": "text",
2084
+ "primaryKey": false,
2085
+ "notNull": true,
2086
+ "default": "'active'"
2087
+ },
2088
+ "document": {
2089
+ "name": "document",
2090
+ "type": "jsonb",
2091
+ "primaryKey": false,
2092
+ "notNull": true
2093
+ },
2094
+ "hash": {
2095
+ "name": "hash",
2096
+ "type": "text",
2097
+ "primaryKey": false,
2098
+ "notNull": true
2099
+ },
2100
+ "created_by": {
2101
+ "name": "created_by",
2102
+ "type": "uuid",
2103
+ "primaryKey": false,
2104
+ "notNull": false
2105
+ },
2106
+ "created_at": {
2107
+ "name": "created_at",
2108
+ "type": "timestamp with time zone",
2109
+ "primaryKey": false,
2110
+ "notNull": true,
2111
+ "default": "now()"
2112
+ }
2113
+ },
2114
+ "indexes": {
2115
+ "policy_bundles_team_scope_version": {
2116
+ "name": "policy_bundles_team_scope_version",
2117
+ "columns": [
2118
+ {
2119
+ "expression": "team_id",
2120
+ "isExpression": false,
2121
+ "asc": true,
2122
+ "nulls": "last"
2123
+ },
2124
+ {
2125
+ "expression": "scope_key",
2126
+ "isExpression": false,
2127
+ "asc": true,
2128
+ "nulls": "last"
2129
+ },
2130
+ {
2131
+ "expression": "version",
2132
+ "isExpression": false,
2133
+ "asc": true,
2134
+ "nulls": "last"
2135
+ }
2136
+ ],
2137
+ "isUnique": true,
2138
+ "concurrently": false,
2139
+ "method": "btree",
2140
+ "with": {}
2141
+ }
2142
+ },
2143
+ "foreignKeys": {
2144
+ "policy_bundles_team_id_teams_id_fk": {
2145
+ "name": "policy_bundles_team_id_teams_id_fk",
2146
+ "tableFrom": "policy_bundles",
2147
+ "tableTo": "teams",
2148
+ "columnsFrom": [
2149
+ "team_id"
2150
+ ],
2151
+ "columnsTo": [
2152
+ "id"
2153
+ ],
2154
+ "onDelete": "cascade",
2155
+ "onUpdate": "no action"
2156
+ },
2157
+ "policy_bundles_project_id_projects_id_fk": {
2158
+ "name": "policy_bundles_project_id_projects_id_fk",
2159
+ "tableFrom": "policy_bundles",
2160
+ "tableTo": "projects",
2161
+ "columnsFrom": [
2162
+ "project_id"
2163
+ ],
2164
+ "columnsTo": [
2165
+ "id"
2166
+ ],
2167
+ "onDelete": "cascade",
2168
+ "onUpdate": "no action"
2169
+ },
2170
+ "policy_bundles_created_by_users_id_fk": {
2171
+ "name": "policy_bundles_created_by_users_id_fk",
2172
+ "tableFrom": "policy_bundles",
2173
+ "tableTo": "users",
2174
+ "columnsFrom": [
2175
+ "created_by"
2176
+ ],
2177
+ "columnsTo": [
2178
+ "id"
2179
+ ],
2180
+ "onDelete": "set null",
2181
+ "onUpdate": "no action"
2182
+ }
2183
+ },
2184
+ "compositePrimaryKeys": {},
2185
+ "uniqueConstraints": {},
2186
+ "policies": {},
2187
+ "checkConstraints": {},
2188
+ "isRLSEnabled": false
2189
+ },
2190
+ "public.policy_receipts": {
2191
+ "name": "policy_receipts",
2192
+ "schema": "",
2193
+ "columns": {
2194
+ "run_id": {
2195
+ "name": "run_id",
2196
+ "type": "uuid",
2197
+ "primaryKey": true,
2198
+ "notNull": true
2199
+ },
2200
+ "expected_hash": {
2201
+ "name": "expected_hash",
2202
+ "type": "text",
2203
+ "primaryKey": false,
2204
+ "notNull": true
2205
+ },
2206
+ "reported_hash": {
2207
+ "name": "reported_hash",
2208
+ "type": "text",
2209
+ "primaryKey": false,
2210
+ "notNull": false
2211
+ },
2212
+ "drift": {
2213
+ "name": "drift",
2214
+ "type": "boolean",
2215
+ "primaryKey": false,
2216
+ "notNull": true,
2217
+ "default": false
2218
+ },
2219
+ "created_at": {
2220
+ "name": "created_at",
2221
+ "type": "timestamp with time zone",
2222
+ "primaryKey": false,
2223
+ "notNull": true,
2224
+ "default": "now()"
2225
+ }
2226
+ },
2227
+ "indexes": {},
2228
+ "foreignKeys": {
2229
+ "policy_receipts_run_id_agent_runs_id_fk": {
2230
+ "name": "policy_receipts_run_id_agent_runs_id_fk",
2231
+ "tableFrom": "policy_receipts",
2232
+ "tableTo": "agent_runs",
2233
+ "columnsFrom": [
2234
+ "run_id"
2235
+ ],
2236
+ "columnsTo": [
2237
+ "id"
2238
+ ],
2239
+ "onDelete": "cascade",
2240
+ "onUpdate": "no action"
2241
+ }
2242
+ },
2243
+ "compositePrimaryKeys": {},
2244
+ "uniqueConstraints": {},
2245
+ "policies": {},
2246
+ "checkConstraints": {},
2247
+ "isRLSEnabled": false
2248
+ },
2249
+ "public.projects": {
2250
+ "name": "projects",
2251
+ "schema": "",
2252
+ "columns": {
2253
+ "id": {
2254
+ "name": "id",
2255
+ "type": "uuid",
2256
+ "primaryKey": true,
2257
+ "notNull": true,
2258
+ "default": "gen_random_uuid()"
2259
+ },
2260
+ "team_id": {
2261
+ "name": "team_id",
2262
+ "type": "uuid",
2263
+ "primaryKey": false,
2264
+ "notNull": true
2265
+ },
2266
+ "name": {
2267
+ "name": "name",
2268
+ "type": "text",
2269
+ "primaryKey": false,
2270
+ "notNull": true
2271
+ },
2272
+ "slug": {
2273
+ "name": "slug",
2274
+ "type": "text",
2275
+ "primaryKey": false,
2276
+ "notNull": true
2277
+ },
2278
+ "created_by": {
2279
+ "name": "created_by",
2280
+ "type": "uuid",
2281
+ "primaryKey": false,
2282
+ "notNull": false
2283
+ },
2284
+ "created_at": {
2285
+ "name": "created_at",
2286
+ "type": "timestamp with time zone",
2287
+ "primaryKey": false,
2288
+ "notNull": true,
2289
+ "default": "now()"
2290
+ }
2291
+ },
2292
+ "indexes": {
2293
+ "projects_team_slug": {
2294
+ "name": "projects_team_slug",
2295
+ "columns": [
2296
+ {
2297
+ "expression": "team_id",
2298
+ "isExpression": false,
2299
+ "asc": true,
2300
+ "nulls": "last"
2301
+ },
2302
+ {
2303
+ "expression": "slug",
2304
+ "isExpression": false,
2305
+ "asc": true,
2306
+ "nulls": "last"
2307
+ }
2308
+ ],
2309
+ "isUnique": true,
2310
+ "concurrently": false,
2311
+ "method": "btree",
2312
+ "with": {}
2313
+ }
2314
+ },
2315
+ "foreignKeys": {
2316
+ "projects_team_id_teams_id_fk": {
2317
+ "name": "projects_team_id_teams_id_fk",
2318
+ "tableFrom": "projects",
2319
+ "tableTo": "teams",
2320
+ "columnsFrom": [
2321
+ "team_id"
2322
+ ],
2323
+ "columnsTo": [
2324
+ "id"
2325
+ ],
2326
+ "onDelete": "cascade",
2327
+ "onUpdate": "no action"
2328
+ },
2329
+ "projects_created_by_users_id_fk": {
2330
+ "name": "projects_created_by_users_id_fk",
2331
+ "tableFrom": "projects",
2332
+ "tableTo": "users",
2333
+ "columnsFrom": [
2334
+ "created_by"
2335
+ ],
2336
+ "columnsTo": [
2337
+ "id"
2338
+ ],
2339
+ "onDelete": "no action",
2340
+ "onUpdate": "no action"
2341
+ }
2342
+ },
2343
+ "compositePrimaryKeys": {},
2344
+ "uniqueConstraints": {},
2345
+ "policies": {},
2346
+ "checkConstraints": {},
2347
+ "isRLSEnabled": false
2348
+ },
2349
+ "public.rate_counters": {
2350
+ "name": "rate_counters",
2351
+ "schema": "",
2352
+ "columns": {
2353
+ "key": {
2354
+ "name": "key",
2355
+ "type": "text",
2356
+ "primaryKey": true,
2357
+ "notNull": true
2358
+ },
2359
+ "count": {
2360
+ "name": "count",
2361
+ "type": "integer",
2362
+ "primaryKey": false,
2363
+ "notNull": true,
2364
+ "default": 0
2365
+ },
2366
+ "expires_at": {
2367
+ "name": "expires_at",
2368
+ "type": "timestamp with time zone",
2369
+ "primaryKey": false,
2370
+ "notNull": true
2371
+ }
2372
+ },
2373
+ "indexes": {
2374
+ "rate_counters_expires": {
2375
+ "name": "rate_counters_expires",
2376
+ "columns": [
2377
+ {
2378
+ "expression": "expires_at",
2379
+ "isExpression": false,
2380
+ "asc": true,
2381
+ "nulls": "last"
2382
+ }
2383
+ ],
2384
+ "isUnique": false,
2385
+ "concurrently": false,
2386
+ "method": "btree",
2387
+ "with": {}
2388
+ }
2389
+ },
2390
+ "foreignKeys": {},
2391
+ "compositePrimaryKeys": {},
2392
+ "uniqueConstraints": {},
2393
+ "policies": {},
2394
+ "checkConstraints": {},
2395
+ "isRLSEnabled": false
2396
+ },
2397
+ "public.read_state": {
2398
+ "name": "read_state",
2399
+ "schema": "",
2400
+ "columns": {
2401
+ "user_id": {
2402
+ "name": "user_id",
2403
+ "type": "uuid",
2404
+ "primaryKey": false,
2405
+ "notNull": true
2406
+ },
2407
+ "session_id": {
2408
+ "name": "session_id",
2409
+ "type": "uuid",
2410
+ "primaryKey": false,
2411
+ "notNull": true
2412
+ },
2413
+ "last_read_at": {
2414
+ "name": "last_read_at",
2415
+ "type": "timestamp with time zone",
2416
+ "primaryKey": false,
2417
+ "notNull": true,
2418
+ "default": "now()"
2419
+ }
2420
+ },
2421
+ "indexes": {},
2422
+ "foreignKeys": {
2423
+ "read_state_user_id_users_id_fk": {
2424
+ "name": "read_state_user_id_users_id_fk",
2425
+ "tableFrom": "read_state",
2426
+ "tableTo": "users",
2427
+ "columnsFrom": [
2428
+ "user_id"
2429
+ ],
2430
+ "columnsTo": [
2431
+ "id"
2432
+ ],
2433
+ "onDelete": "cascade",
2434
+ "onUpdate": "no action"
2435
+ },
2436
+ "read_state_session_id_debug_sessions_id_fk": {
2437
+ "name": "read_state_session_id_debug_sessions_id_fk",
2438
+ "tableFrom": "read_state",
2439
+ "tableTo": "debug_sessions",
2440
+ "columnsFrom": [
2441
+ "session_id"
2442
+ ],
2443
+ "columnsTo": [
2444
+ "id"
2445
+ ],
2446
+ "onDelete": "cascade",
2447
+ "onUpdate": "no action"
2448
+ }
2449
+ },
2450
+ "compositePrimaryKeys": {
2451
+ "read_state_user_id_session_id_pk": {
2452
+ "name": "read_state_user_id_session_id_pk",
2453
+ "columns": [
2454
+ "user_id",
2455
+ "session_id"
2456
+ ]
2457
+ }
2458
+ },
2459
+ "uniqueConstraints": {},
2460
+ "policies": {},
2461
+ "checkConstraints": {},
2462
+ "isRLSEnabled": false
2463
+ },
2464
+ "public.saving_confirmations": {
2465
+ "name": "saving_confirmations",
2466
+ "schema": "",
2467
+ "columns": {
2468
+ "id": {
2469
+ "name": "id",
2470
+ "type": "uuid",
2471
+ "primaryKey": true,
2472
+ "notNull": true,
2473
+ "default": "gen_random_uuid()"
2474
+ },
2475
+ "team_id": {
2476
+ "name": "team_id",
2477
+ "type": "uuid",
2478
+ "primaryKey": false,
2479
+ "notNull": true
2480
+ },
2481
+ "kind": {
2482
+ "name": "kind",
2483
+ "type": "text",
2484
+ "primaryKey": false,
2485
+ "notNull": true
2486
+ },
2487
+ "ref_id": {
2488
+ "name": "ref_id",
2489
+ "type": "uuid",
2490
+ "primaryKey": false,
2491
+ "notNull": true
2492
+ },
2493
+ "run_id": {
2494
+ "name": "run_id",
2495
+ "type": "uuid",
2496
+ "primaryKey": false,
2497
+ "notNull": false
2498
+ },
2499
+ "confirmed_by": {
2500
+ "name": "confirmed_by",
2501
+ "type": "uuid",
2502
+ "primaryKey": false,
2503
+ "notNull": false
2504
+ },
2505
+ "helpful": {
2506
+ "name": "helpful",
2507
+ "type": "boolean",
2508
+ "primaryKey": false,
2509
+ "notNull": true
2510
+ },
2511
+ "changed_behaviour": {
2512
+ "name": "changed_behaviour",
2513
+ "type": "boolean",
2514
+ "primaryKey": false,
2515
+ "notNull": true,
2516
+ "default": false
2517
+ },
2518
+ "minutes_saved": {
2519
+ "name": "minutes_saved",
2520
+ "type": "integer",
2521
+ "primaryKey": false,
2522
+ "notNull": false
2523
+ },
2524
+ "spend_stopped": {
2525
+ "name": "spend_stopped",
2526
+ "type": "boolean",
2527
+ "primaryKey": false,
2528
+ "notNull": true,
2529
+ "default": false
2530
+ },
2531
+ "note": {
2532
+ "name": "note",
2533
+ "type": "text",
2534
+ "primaryKey": false,
2535
+ "notNull": false
2536
+ },
2537
+ "created_at": {
2538
+ "name": "created_at",
2539
+ "type": "timestamp with time zone",
2540
+ "primaryKey": false,
2541
+ "notNull": true,
2542
+ "default": "now()"
2543
+ }
2544
+ },
2545
+ "indexes": {
2546
+ "saving_confirmations_ref_idx": {
2547
+ "name": "saving_confirmations_ref_idx",
2548
+ "columns": [
2549
+ {
2550
+ "expression": "kind",
2551
+ "isExpression": false,
2552
+ "asc": true,
2553
+ "nulls": "last"
2554
+ },
2555
+ {
2556
+ "expression": "ref_id",
2557
+ "isExpression": false,
2558
+ "asc": true,
2559
+ "nulls": "last"
2560
+ }
2561
+ ],
2562
+ "isUnique": true,
2563
+ "concurrently": false,
2564
+ "method": "btree",
2565
+ "with": {}
2566
+ },
2567
+ "saving_confirmations_team_idx": {
2568
+ "name": "saving_confirmations_team_idx",
2569
+ "columns": [
2570
+ {
2571
+ "expression": "team_id",
2572
+ "isExpression": false,
2573
+ "asc": true,
2574
+ "nulls": "last"
2575
+ },
2576
+ {
2577
+ "expression": "created_at",
2578
+ "isExpression": false,
2579
+ "asc": true,
2580
+ "nulls": "last"
2581
+ }
2582
+ ],
2583
+ "isUnique": false,
2584
+ "concurrently": false,
2585
+ "method": "btree",
2586
+ "with": {}
2587
+ }
2588
+ },
2589
+ "foreignKeys": {
2590
+ "saving_confirmations_team_id_teams_id_fk": {
2591
+ "name": "saving_confirmations_team_id_teams_id_fk",
2592
+ "tableFrom": "saving_confirmations",
2593
+ "tableTo": "teams",
2594
+ "columnsFrom": [
2595
+ "team_id"
2596
+ ],
2597
+ "columnsTo": [
2598
+ "id"
2599
+ ],
2600
+ "onDelete": "cascade",
2601
+ "onUpdate": "no action"
2602
+ },
2603
+ "saving_confirmations_run_id_agent_runs_id_fk": {
2604
+ "name": "saving_confirmations_run_id_agent_runs_id_fk",
2605
+ "tableFrom": "saving_confirmations",
2606
+ "tableTo": "agent_runs",
2607
+ "columnsFrom": [
2608
+ "run_id"
2609
+ ],
2610
+ "columnsTo": [
2611
+ "id"
2612
+ ],
2613
+ "onDelete": "cascade",
2614
+ "onUpdate": "no action"
2615
+ },
2616
+ "saving_confirmations_confirmed_by_users_id_fk": {
2617
+ "name": "saving_confirmations_confirmed_by_users_id_fk",
2618
+ "tableFrom": "saving_confirmations",
2619
+ "tableTo": "users",
2620
+ "columnsFrom": [
2621
+ "confirmed_by"
2622
+ ],
2623
+ "columnsTo": [
2624
+ "id"
2625
+ ],
2626
+ "onDelete": "no action",
2627
+ "onUpdate": "no action"
2628
+ }
2629
+ },
2630
+ "compositePrimaryKeys": {},
2631
+ "uniqueConstraints": {},
2632
+ "policies": {},
2633
+ "checkConstraints": {},
2634
+ "isRLSEnabled": false
2635
+ },
2636
+ "public.snapshots": {
2637
+ "name": "snapshots",
2638
+ "schema": "",
2639
+ "columns": {
2640
+ "id": {
2641
+ "name": "id",
2642
+ "type": "uuid",
2643
+ "primaryKey": true,
2644
+ "notNull": true,
2645
+ "default": "gen_random_uuid()"
2646
+ },
2647
+ "team_id": {
2648
+ "name": "team_id",
2649
+ "type": "uuid",
2650
+ "primaryKey": false,
2651
+ "notNull": true
2652
+ },
2653
+ "user_id": {
2654
+ "name": "user_id",
2655
+ "type": "uuid",
2656
+ "primaryKey": false,
2657
+ "notNull": true
2658
+ },
2659
+ "repo": {
2660
+ "name": "repo",
2661
+ "type": "text",
2662
+ "primaryKey": false,
2663
+ "notNull": false
2664
+ },
2665
+ "project_id": {
2666
+ "name": "project_id",
2667
+ "type": "uuid",
2668
+ "primaryKey": false,
2669
+ "notNull": false
2670
+ },
2671
+ "token_id": {
2672
+ "name": "token_id",
2673
+ "type": "uuid",
2674
+ "primaryKey": false,
2675
+ "notNull": false
2676
+ },
2677
+ "device_label": {
2678
+ "name": "device_label",
2679
+ "type": "text",
2680
+ "primaryKey": false,
2681
+ "notNull": true,
2682
+ "default": "'default'"
2683
+ },
2684
+ "device_id": {
2685
+ "name": "device_id",
2686
+ "type": "uuid",
2687
+ "primaryKey": false,
2688
+ "notNull": false
2689
+ },
2690
+ "data": {
2691
+ "name": "data",
2692
+ "type": "jsonb",
2693
+ "primaryKey": false,
2694
+ "notNull": true
2695
+ },
2696
+ "created_at": {
2697
+ "name": "created_at",
2698
+ "type": "timestamp with time zone",
2699
+ "primaryKey": false,
2700
+ "notNull": true,
2701
+ "default": "now()"
2702
+ }
2703
+ },
2704
+ "indexes": {
2705
+ "snapshots_team_user_created": {
2706
+ "name": "snapshots_team_user_created",
2707
+ "columns": [
2708
+ {
2709
+ "expression": "team_id",
2710
+ "isExpression": false,
2711
+ "asc": true,
2712
+ "nulls": "last"
2713
+ },
2714
+ {
2715
+ "expression": "user_id",
2716
+ "isExpression": false,
2717
+ "asc": true,
2718
+ "nulls": "last"
2719
+ },
2720
+ {
2721
+ "expression": "created_at",
2722
+ "isExpression": false,
2723
+ "asc": true,
2724
+ "nulls": "last"
2725
+ }
2726
+ ],
2727
+ "isUnique": false,
2728
+ "concurrently": false,
2729
+ "method": "btree",
2730
+ "with": {}
2731
+ },
2732
+ "snapshots_team_user_device_created": {
2733
+ "name": "snapshots_team_user_device_created",
2734
+ "columns": [
2735
+ {
2736
+ "expression": "team_id",
2737
+ "isExpression": false,
2738
+ "asc": true,
2739
+ "nulls": "last"
2740
+ },
2741
+ {
2742
+ "expression": "user_id",
2743
+ "isExpression": false,
2744
+ "asc": true,
2745
+ "nulls": "last"
2746
+ },
2747
+ {
2748
+ "expression": "device_label",
2749
+ "isExpression": false,
2750
+ "asc": true,
2751
+ "nulls": "last"
2752
+ },
2753
+ {
2754
+ "expression": "created_at",
2755
+ "isExpression": false,
2756
+ "asc": true,
2757
+ "nulls": "last"
2758
+ }
2759
+ ],
2760
+ "isUnique": false,
2761
+ "concurrently": false,
2762
+ "method": "btree",
2763
+ "with": {}
2764
+ }
2765
+ },
2766
+ "foreignKeys": {
2767
+ "snapshots_team_id_teams_id_fk": {
2768
+ "name": "snapshots_team_id_teams_id_fk",
2769
+ "tableFrom": "snapshots",
2770
+ "tableTo": "teams",
2771
+ "columnsFrom": [
2772
+ "team_id"
2773
+ ],
2774
+ "columnsTo": [
2775
+ "id"
2776
+ ],
2777
+ "onDelete": "cascade",
2778
+ "onUpdate": "no action"
2779
+ },
2780
+ "snapshots_user_id_users_id_fk": {
2781
+ "name": "snapshots_user_id_users_id_fk",
2782
+ "tableFrom": "snapshots",
2783
+ "tableTo": "users",
2784
+ "columnsFrom": [
2785
+ "user_id"
2786
+ ],
2787
+ "columnsTo": [
2788
+ "id"
2789
+ ],
2790
+ "onDelete": "cascade",
2791
+ "onUpdate": "no action"
2792
+ },
2793
+ "snapshots_project_id_projects_id_fk": {
2794
+ "name": "snapshots_project_id_projects_id_fk",
2795
+ "tableFrom": "snapshots",
2796
+ "tableTo": "projects",
2797
+ "columnsFrom": [
2798
+ "project_id"
2799
+ ],
2800
+ "columnsTo": [
2801
+ "id"
2802
+ ],
2803
+ "onDelete": "cascade",
2804
+ "onUpdate": "no action"
2805
+ },
2806
+ "snapshots_token_id_tokens_id_fk": {
2807
+ "name": "snapshots_token_id_tokens_id_fk",
2808
+ "tableFrom": "snapshots",
2809
+ "tableTo": "tokens",
2810
+ "columnsFrom": [
2811
+ "token_id"
2812
+ ],
2813
+ "columnsTo": [
2814
+ "id"
2815
+ ],
2816
+ "onDelete": "set null",
2817
+ "onUpdate": "no action"
2818
+ },
2819
+ "snapshots_device_id_agent_installations_id_fk": {
2820
+ "name": "snapshots_device_id_agent_installations_id_fk",
2821
+ "tableFrom": "snapshots",
2822
+ "tableTo": "agent_installations",
2823
+ "columnsFrom": [
2824
+ "device_id"
2825
+ ],
2826
+ "columnsTo": [
2827
+ "id"
2828
+ ],
2829
+ "onDelete": "set null",
2830
+ "onUpdate": "no action"
2831
+ }
2832
+ },
2833
+ "compositePrimaryKeys": {},
2834
+ "uniqueConstraints": {},
2835
+ "policies": {},
2836
+ "checkConstraints": {},
2837
+ "isRLSEnabled": false
2838
+ },
2839
+ "public.team_integrations": {
2840
+ "name": "team_integrations",
2841
+ "schema": "",
2842
+ "columns": {
2843
+ "id": {
2844
+ "name": "id",
2845
+ "type": "uuid",
2846
+ "primaryKey": true,
2847
+ "notNull": true,
2848
+ "default": "gen_random_uuid()"
2849
+ },
2850
+ "team_id": {
2851
+ "name": "team_id",
2852
+ "type": "uuid",
2853
+ "primaryKey": false,
2854
+ "notNull": true
2855
+ },
2856
+ "provider": {
2857
+ "name": "provider",
2858
+ "type": "text",
2859
+ "primaryKey": false,
2860
+ "notNull": true,
2861
+ "default": "'github'"
2862
+ },
2863
+ "repo": {
2864
+ "name": "repo",
2865
+ "type": "text",
2866
+ "primaryKey": false,
2867
+ "notNull": true
2868
+ },
2869
+ "token": {
2870
+ "name": "token",
2871
+ "type": "text",
2872
+ "primaryKey": false,
2873
+ "notNull": true
2874
+ },
2875
+ "comment_on_finish": {
2876
+ "name": "comment_on_finish",
2877
+ "type": "boolean",
2878
+ "primaryKey": false,
2879
+ "notNull": true,
2880
+ "default": true
2881
+ },
2882
+ "config": {
2883
+ "name": "config",
2884
+ "type": "jsonb",
2885
+ "primaryKey": false,
2886
+ "notNull": false
2887
+ },
2888
+ "created_by": {
2889
+ "name": "created_by",
2890
+ "type": "uuid",
2891
+ "primaryKey": false,
2892
+ "notNull": false
2893
+ },
2894
+ "created_at": {
2895
+ "name": "created_at",
2896
+ "type": "timestamp with time zone",
2897
+ "primaryKey": false,
2898
+ "notNull": true,
2899
+ "default": "now()"
2900
+ },
2901
+ "updated_at": {
2902
+ "name": "updated_at",
2903
+ "type": "timestamp with time zone",
2904
+ "primaryKey": false,
2905
+ "notNull": true,
2906
+ "default": "now()"
2907
+ }
2908
+ },
2909
+ "indexes": {
2910
+ "team_integrations_team_provider": {
2911
+ "name": "team_integrations_team_provider",
2912
+ "columns": [
2913
+ {
2914
+ "expression": "team_id",
2915
+ "isExpression": false,
2916
+ "asc": true,
2917
+ "nulls": "last"
2918
+ },
2919
+ {
2920
+ "expression": "provider",
2921
+ "isExpression": false,
2922
+ "asc": true,
2923
+ "nulls": "last"
2924
+ }
2925
+ ],
2926
+ "isUnique": true,
2927
+ "concurrently": false,
2928
+ "method": "btree",
2929
+ "with": {}
2930
+ }
2931
+ },
2932
+ "foreignKeys": {
2933
+ "team_integrations_team_id_teams_id_fk": {
2934
+ "name": "team_integrations_team_id_teams_id_fk",
2935
+ "tableFrom": "team_integrations",
2936
+ "tableTo": "teams",
2937
+ "columnsFrom": [
2938
+ "team_id"
2939
+ ],
2940
+ "columnsTo": [
2941
+ "id"
2942
+ ],
2943
+ "onDelete": "cascade",
2944
+ "onUpdate": "no action"
2945
+ },
2946
+ "team_integrations_created_by_users_id_fk": {
2947
+ "name": "team_integrations_created_by_users_id_fk",
2948
+ "tableFrom": "team_integrations",
2949
+ "tableTo": "users",
2950
+ "columnsFrom": [
2951
+ "created_by"
2952
+ ],
2953
+ "columnsTo": [
2954
+ "id"
2955
+ ],
2956
+ "onDelete": "set null",
2957
+ "onUpdate": "no action"
2958
+ }
2959
+ },
2960
+ "compositePrimaryKeys": {},
2961
+ "uniqueConstraints": {},
2962
+ "policies": {},
2963
+ "checkConstraints": {},
2964
+ "isRLSEnabled": false
2965
+ },
2966
+ "public.teams": {
2967
+ "name": "teams",
2968
+ "schema": "",
2969
+ "columns": {
2970
+ "id": {
2971
+ "name": "id",
2972
+ "type": "uuid",
2973
+ "primaryKey": true,
2974
+ "notNull": true,
2975
+ "default": "gen_random_uuid()"
2976
+ },
2977
+ "name": {
2978
+ "name": "name",
2979
+ "type": "text",
2980
+ "primaryKey": false,
2981
+ "notNull": true
2982
+ },
2983
+ "slug": {
2984
+ "name": "slug",
2985
+ "type": "text",
2986
+ "primaryKey": false,
2987
+ "notNull": true
2988
+ },
2989
+ "created_by": {
2990
+ "name": "created_by",
2991
+ "type": "uuid",
2992
+ "primaryKey": false,
2993
+ "notNull": false
2994
+ },
2995
+ "webhook_url": {
2996
+ "name": "webhook_url",
2997
+ "type": "text",
2998
+ "primaryKey": false,
2999
+ "notNull": false
3000
+ },
3001
+ "plan": {
3002
+ "name": "plan",
3003
+ "type": "text",
3004
+ "primaryKey": false,
3005
+ "notNull": true,
3006
+ "default": "'free'"
3007
+ },
3008
+ "hourly_cost_cents": {
3009
+ "name": "hourly_cost_cents",
3010
+ "type": "integer",
3011
+ "primaryKey": false,
3012
+ "notNull": false
3013
+ },
3014
+ "inbound_token": {
3015
+ "name": "inbound_token",
3016
+ "type": "text",
3017
+ "primaryKey": false,
3018
+ "notNull": false
3019
+ },
3020
+ "created_at": {
3021
+ "name": "created_at",
3022
+ "type": "timestamp with time zone",
3023
+ "primaryKey": false,
3024
+ "notNull": true,
3025
+ "default": "now()"
3026
+ }
3027
+ },
3028
+ "indexes": {},
3029
+ "foreignKeys": {
3030
+ "teams_created_by_users_id_fk": {
3031
+ "name": "teams_created_by_users_id_fk",
3032
+ "tableFrom": "teams",
3033
+ "tableTo": "users",
3034
+ "columnsFrom": [
3035
+ "created_by"
3036
+ ],
3037
+ "columnsTo": [
3038
+ "id"
3039
+ ],
3040
+ "onDelete": "no action",
3041
+ "onUpdate": "no action"
3042
+ }
3043
+ },
3044
+ "compositePrimaryKeys": {},
3045
+ "uniqueConstraints": {
3046
+ "teams_slug_unique": {
3047
+ "name": "teams_slug_unique",
3048
+ "nullsNotDistinct": false,
3049
+ "columns": [
3050
+ "slug"
3051
+ ]
3052
+ },
3053
+ "teams_inbound_token_unique": {
3054
+ "name": "teams_inbound_token_unique",
3055
+ "nullsNotDistinct": false,
3056
+ "columns": [
3057
+ "inbound_token"
3058
+ ]
3059
+ }
3060
+ },
3061
+ "policies": {},
3062
+ "checkConstraints": {},
3063
+ "isRLSEnabled": false
3064
+ },
3065
+ "public.tokens": {
3066
+ "name": "tokens",
3067
+ "schema": "",
3068
+ "columns": {
3069
+ "id": {
3070
+ "name": "id",
3071
+ "type": "uuid",
3072
+ "primaryKey": true,
3073
+ "notNull": true,
3074
+ "default": "gen_random_uuid()"
3075
+ },
3076
+ "user_id": {
3077
+ "name": "user_id",
3078
+ "type": "uuid",
3079
+ "primaryKey": false,
3080
+ "notNull": true
3081
+ },
3082
+ "name": {
3083
+ "name": "name",
3084
+ "type": "text",
3085
+ "primaryKey": false,
3086
+ "notNull": true
3087
+ },
3088
+ "token_hash": {
3089
+ "name": "token_hash",
3090
+ "type": "text",
3091
+ "primaryKey": false,
3092
+ "notNull": true
3093
+ },
3094
+ "prefix": {
3095
+ "name": "prefix",
3096
+ "type": "text",
3097
+ "primaryKey": false,
3098
+ "notNull": true
3099
+ },
3100
+ "last_used_at": {
3101
+ "name": "last_used_at",
3102
+ "type": "timestamp with time zone",
3103
+ "primaryKey": false,
3104
+ "notNull": false
3105
+ },
3106
+ "revoked_at": {
3107
+ "name": "revoked_at",
3108
+ "type": "timestamp with time zone",
3109
+ "primaryKey": false,
3110
+ "notNull": false
3111
+ },
3112
+ "created_at": {
3113
+ "name": "created_at",
3114
+ "type": "timestamp with time zone",
3115
+ "primaryKey": false,
3116
+ "notNull": true,
3117
+ "default": "now()"
3118
+ }
3119
+ },
3120
+ "indexes": {},
3121
+ "foreignKeys": {
3122
+ "tokens_user_id_users_id_fk": {
3123
+ "name": "tokens_user_id_users_id_fk",
3124
+ "tableFrom": "tokens",
3125
+ "tableTo": "users",
3126
+ "columnsFrom": [
3127
+ "user_id"
3128
+ ],
3129
+ "columnsTo": [
3130
+ "id"
3131
+ ],
3132
+ "onDelete": "cascade",
3133
+ "onUpdate": "no action"
3134
+ }
3135
+ },
3136
+ "compositePrimaryKeys": {},
3137
+ "uniqueConstraints": {
3138
+ "tokens_token_hash_unique": {
3139
+ "name": "tokens_token_hash_unique",
3140
+ "nullsNotDistinct": false,
3141
+ "columns": [
3142
+ "token_hash"
3143
+ ]
3144
+ }
3145
+ },
3146
+ "policies": {},
3147
+ "checkConstraints": {},
3148
+ "isRLSEnabled": false
3149
+ },
3150
+ "public.users": {
3151
+ "name": "users",
3152
+ "schema": "",
3153
+ "columns": {
3154
+ "id": {
3155
+ "name": "id",
3156
+ "type": "uuid",
3157
+ "primaryKey": true,
3158
+ "notNull": true,
3159
+ "default": "gen_random_uuid()"
3160
+ },
3161
+ "github_id": {
3162
+ "name": "github_id",
3163
+ "type": "bigint",
3164
+ "primaryKey": false,
3165
+ "notNull": false
3166
+ },
3167
+ "username": {
3168
+ "name": "username",
3169
+ "type": "text",
3170
+ "primaryKey": false,
3171
+ "notNull": true
3172
+ },
3173
+ "password_hash": {
3174
+ "name": "password_hash",
3175
+ "type": "text",
3176
+ "primaryKey": false,
3177
+ "notNull": false
3178
+ },
3179
+ "display_name": {
3180
+ "name": "display_name",
3181
+ "type": "text",
3182
+ "primaryKey": false,
3183
+ "notNull": false
3184
+ },
3185
+ "email": {
3186
+ "name": "email",
3187
+ "type": "text",
3188
+ "primaryKey": false,
3189
+ "notNull": false
3190
+ },
3191
+ "avatar_url": {
3192
+ "name": "avatar_url",
3193
+ "type": "text",
3194
+ "primaryKey": false,
3195
+ "notNull": false
3196
+ },
3197
+ "created_at": {
3198
+ "name": "created_at",
3199
+ "type": "timestamp with time zone",
3200
+ "primaryKey": false,
3201
+ "notNull": true,
3202
+ "default": "now()"
3203
+ }
3204
+ },
3205
+ "indexes": {
3206
+ "users_email_unique": {
3207
+ "name": "users_email_unique",
3208
+ "columns": [
3209
+ {
3210
+ "expression": "email",
3211
+ "isExpression": false,
3212
+ "asc": true,
3213
+ "nulls": "last"
3214
+ }
3215
+ ],
3216
+ "isUnique": true,
3217
+ "where": "email is not null",
3218
+ "concurrently": false,
3219
+ "method": "btree",
3220
+ "with": {}
3221
+ }
3222
+ },
3223
+ "foreignKeys": {},
3224
+ "compositePrimaryKeys": {},
3225
+ "uniqueConstraints": {
3226
+ "users_github_id_unique": {
3227
+ "name": "users_github_id_unique",
3228
+ "nullsNotDistinct": false,
3229
+ "columns": [
3230
+ "github_id"
3231
+ ]
3232
+ },
3233
+ "users_username_unique": {
3234
+ "name": "users_username_unique",
3235
+ "nullsNotDistinct": false,
3236
+ "columns": [
3237
+ "username"
3238
+ ]
3239
+ }
3240
+ },
3241
+ "policies": {},
3242
+ "checkConstraints": {},
3243
+ "isRLSEnabled": false
3244
+ },
3245
+ "public.web_sessions": {
3246
+ "name": "web_sessions",
3247
+ "schema": "",
3248
+ "columns": {
3249
+ "id": {
3250
+ "name": "id",
3251
+ "type": "text",
3252
+ "primaryKey": true,
3253
+ "notNull": true
3254
+ },
3255
+ "user_id": {
3256
+ "name": "user_id",
3257
+ "type": "uuid",
3258
+ "primaryKey": false,
3259
+ "notNull": true
3260
+ },
3261
+ "expires_at": {
3262
+ "name": "expires_at",
3263
+ "type": "timestamp with time zone",
3264
+ "primaryKey": false,
3265
+ "notNull": true
3266
+ },
3267
+ "created_at": {
3268
+ "name": "created_at",
3269
+ "type": "timestamp with time zone",
3270
+ "primaryKey": false,
3271
+ "notNull": true,
3272
+ "default": "now()"
3273
+ }
3274
+ },
3275
+ "indexes": {},
3276
+ "foreignKeys": {
3277
+ "web_sessions_user_id_users_id_fk": {
3278
+ "name": "web_sessions_user_id_users_id_fk",
3279
+ "tableFrom": "web_sessions",
3280
+ "tableTo": "users",
3281
+ "columnsFrom": [
3282
+ "user_id"
3283
+ ],
3284
+ "columnsTo": [
3285
+ "id"
3286
+ ],
3287
+ "onDelete": "cascade",
3288
+ "onUpdate": "no action"
3289
+ }
3290
+ },
3291
+ "compositePrimaryKeys": {},
3292
+ "uniqueConstraints": {},
3293
+ "policies": {},
3294
+ "checkConstraints": {},
3295
+ "isRLSEnabled": false
3296
+ },
3297
+ "public.work_claims": {
3298
+ "name": "work_claims",
3299
+ "schema": "",
3300
+ "columns": {
3301
+ "id": {
3302
+ "name": "id",
3303
+ "type": "uuid",
3304
+ "primaryKey": true,
3305
+ "notNull": true,
3306
+ "default": "gen_random_uuid()"
3307
+ },
3308
+ "run_id": {
3309
+ "name": "run_id",
3310
+ "type": "uuid",
3311
+ "primaryKey": false,
3312
+ "notNull": true
3313
+ },
3314
+ "resource_type": {
3315
+ "name": "resource_type",
3316
+ "type": "text",
3317
+ "primaryKey": false,
3318
+ "notNull": true
3319
+ },
3320
+ "resource_key": {
3321
+ "name": "resource_key",
3322
+ "type": "text",
3323
+ "primaryKey": false,
3324
+ "notNull": true
3325
+ },
3326
+ "access": {
3327
+ "name": "access",
3328
+ "type": "text",
3329
+ "primaryKey": false,
3330
+ "notNull": true,
3331
+ "default": "'write'"
3332
+ },
3333
+ "lease_expires_at": {
3334
+ "name": "lease_expires_at",
3335
+ "type": "timestamp with time zone",
3336
+ "primaryKey": false,
3337
+ "notNull": true
3338
+ },
3339
+ "created_at": {
3340
+ "name": "created_at",
3341
+ "type": "timestamp with time zone",
3342
+ "primaryKey": false,
3343
+ "notNull": true,
3344
+ "default": "now()"
3345
+ }
3346
+ },
3347
+ "indexes": {
3348
+ "work_claims_run_resource": {
3349
+ "name": "work_claims_run_resource",
3350
+ "columns": [
3351
+ {
3352
+ "expression": "run_id",
3353
+ "isExpression": false,
3354
+ "asc": true,
3355
+ "nulls": "last"
3356
+ },
3357
+ {
3358
+ "expression": "resource_type",
3359
+ "isExpression": false,
3360
+ "asc": true,
3361
+ "nulls": "last"
3362
+ },
3363
+ {
3364
+ "expression": "resource_key",
3365
+ "isExpression": false,
3366
+ "asc": true,
3367
+ "nulls": "last"
3368
+ },
3369
+ {
3370
+ "expression": "access",
3371
+ "isExpression": false,
3372
+ "asc": true,
3373
+ "nulls": "last"
3374
+ }
3375
+ ],
3376
+ "isUnique": true,
3377
+ "concurrently": false,
3378
+ "method": "btree",
3379
+ "with": {}
3380
+ },
3381
+ "work_claims_lease": {
3382
+ "name": "work_claims_lease",
3383
+ "columns": [
3384
+ {
3385
+ "expression": "lease_expires_at",
3386
+ "isExpression": false,
3387
+ "asc": true,
3388
+ "nulls": "last"
3389
+ }
3390
+ ],
3391
+ "isUnique": false,
3392
+ "concurrently": false,
3393
+ "method": "btree",
3394
+ "with": {}
3395
+ }
3396
+ },
3397
+ "foreignKeys": {
3398
+ "work_claims_run_id_agent_runs_id_fk": {
3399
+ "name": "work_claims_run_id_agent_runs_id_fk",
3400
+ "tableFrom": "work_claims",
3401
+ "tableTo": "agent_runs",
3402
+ "columnsFrom": [
3403
+ "run_id"
3404
+ ],
3405
+ "columnsTo": [
3406
+ "id"
3407
+ ],
3408
+ "onDelete": "cascade",
3409
+ "onUpdate": "no action"
3410
+ }
3411
+ },
3412
+ "compositePrimaryKeys": {},
3413
+ "uniqueConstraints": {},
3414
+ "policies": {},
3415
+ "checkConstraints": {},
3416
+ "isRLSEnabled": false
3417
+ }
3418
+ },
3419
+ "enums": {},
3420
+ "schemas": {},
3421
+ "sequences": {},
3422
+ "roles": {},
3423
+ "policies": {},
3424
+ "views": {},
3425
+ "_meta": {
3426
+ "columns": {},
3427
+ "schemas": {},
3428
+ "tables": {}
3429
+ }
3430
+ }