@fidelios/db 0.0.2 → 0.0.3

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