@orgsdk/cli 2.1.0 → 2.2.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 (69) hide show
  1. package/dist/runtime/client.js +19 -0
  2. package/dist/runtime/contract.js +1 -0
  3. package/dist/runtime/plugins.js +16 -4
  4. package/dist/runtime/runner.js +16 -13
  5. package/dist/runtime/shell-policy.js +31 -0
  6. package/dist/server/{bun-driver-DTZUUCI3.js → bun-driver-UOZIWBHK.js} +1 -1
  7. package/dist/server/{chunk-S5SFX3JM.js → chunk-EXZNZYIJ.js} +13 -0
  8. package/dist/server/index.js +1075 -822
  9. package/dist/server/migrations/0004_shell_executable_policy.sql +9 -0
  10. package/dist/server/migrations/meta/0004_snapshot.json +3455 -0
  11. package/dist/server/migrations/meta/_journal.json +7 -0
  12. package/dist/server/{node-driver-HDJKKWXQ.js → node-driver-75PFAG2L.js} +1 -1
  13. package/dist/server/out/_next/static/chunks/0tlox6w8yf345.css +1 -0
  14. package/dist/server/out/accounts/2fa/__next._full.txt +2 -2
  15. package/dist/server/out/accounts/2fa/__next._tree.txt +2 -2
  16. package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +2 -2
  17. package/dist/server/out/accounts/2fa/index.html +1 -1
  18. package/dist/server/out/accounts/2fa/index.txt +2 -2
  19. package/dist/server/out/accounts/email/__next._full.txt +2 -2
  20. package/dist/server/out/accounts/email/__next._tree.txt +2 -2
  21. package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +2 -2
  22. package/dist/server/out/accounts/email/index.html +1 -1
  23. package/dist/server/out/accounts/email/index.txt +2 -2
  24. package/dist/server/out/accounts/login/__next._full.txt +2 -2
  25. package/dist/server/out/accounts/login/__next._tree.txt +2 -2
  26. package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +2 -2
  27. package/dist/server/out/accounts/login/index.html +1 -1
  28. package/dist/server/out/accounts/login/index.txt +2 -2
  29. package/dist/server/out/accounts/logout/__next._full.txt +2 -2
  30. package/dist/server/out/accounts/logout/__next._tree.txt +2 -2
  31. package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +2 -2
  32. package/dist/server/out/accounts/logout/index.html +1 -1
  33. package/dist/server/out/accounts/logout/index.txt +2 -2
  34. package/dist/server/out/accounts/password/change/__next._full.txt +2 -2
  35. package/dist/server/out/accounts/password/change/__next._tree.txt +2 -2
  36. package/dist/server/out/accounts/password/change/__next.accounts.password.change.__PAGE__.txt +2 -2
  37. package/dist/server/out/accounts/password/change/index.html +1 -1
  38. package/dist/server/out/accounts/password/change/index.txt +2 -2
  39. package/dist/server/out/accounts/password/reset/__next._full.txt +2 -2
  40. package/dist/server/out/accounts/password/reset/__next._tree.txt +2 -2
  41. package/dist/server/out/accounts/password/reset/__next.accounts.password.reset.__PAGE__.txt +2 -2
  42. package/dist/server/out/accounts/password/reset/index.html +1 -1
  43. package/dist/server/out/accounts/password/reset/index.txt +2 -2
  44. package/dist/server/out/accounts/signup/__next._full.txt +2 -2
  45. package/dist/server/out/accounts/signup/__next._tree.txt +2 -2
  46. package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +2 -2
  47. package/dist/server/out/accounts/signup/index.html +1 -1
  48. package/dist/server/out/accounts/signup/index.txt +2 -2
  49. package/dist/server/out/setup/__next._full.txt +2 -2
  50. package/dist/server/out/setup/__next._tree.txt +2 -2
  51. package/dist/server/out/setup/__next.setup.__PAGE__.txt +2 -2
  52. package/dist/server/out/setup/index.html +1 -1
  53. package/dist/server/out/setup/index.txt +2 -2
  54. package/dist/server/out/studio/approve/__next._full.txt +2 -2
  55. package/dist/server/out/studio/approve/__next._tree.txt +2 -2
  56. package/dist/server/out/studio/approve/__next.studio.approve.__PAGE__.txt +2 -2
  57. package/dist/server/out/studio/approve/index.html +1 -1
  58. package/dist/server/out/studio/approve/index.txt +2 -2
  59. package/dist/server/out/workspaces/invite/__next._full.txt +2 -2
  60. package/dist/server/out/workspaces/invite/__next._tree.txt +2 -2
  61. package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +2 -2
  62. package/dist/server/out/workspaces/invite/index.html +1 -1
  63. package/dist/server/out/workspaces/invite/index.txt +2 -2
  64. package/docs/studio.md +6 -0
  65. package/package.json +1 -1
  66. package/dist/server/out/_next/static/chunks/22w_ipn94al45.css +0 -1
  67. /package/dist/server/out/_next/static/{CkCrHy-m0W4Wo6_2T25_g → m1cOvyKRNnDjsWBMfcCJt}/_buildManifest.js +0 -0
  68. /package/dist/server/out/_next/static/{CkCrHy-m0W4Wo6_2T25_g → m1cOvyKRNnDjsWBMfcCJt}/_clientMiddlewareManifest.js +0 -0
  69. /package/dist/server/out/_next/static/{CkCrHy-m0W4Wo6_2T25_g → m1cOvyKRNnDjsWBMfcCJt}/_ssgManifest.js +0 -0
@@ -0,0 +1,3455 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "29b3dc3a-27b7-4373-855a-72458c8eab52",
5
+ "prevId": "ff183674-cef4-4bf3-9140-d6308ff79d91",
6
+ "tables": {
7
+ "action_test_suites": {
8
+ "name": "action_test_suites",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "workspace_id": {
18
+ "name": "workspace_id",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "version_id": {
25
+ "name": "version_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "number": {
32
+ "name": "number",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "cases": {
39
+ "name": "cases",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "digest": {
46
+ "name": "digest",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "created_at": {
53
+ "name": "created_at",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "updated_at": {
60
+ "name": "updated_at",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ }
66
+ },
67
+ "indexes": {
68
+ "action_test_suites_version_id_number_unique": {
69
+ "name": "action_test_suites_version_id_number_unique",
70
+ "columns": [
71
+ "version_id",
72
+ "number"
73
+ ],
74
+ "isUnique": true
75
+ }
76
+ },
77
+ "foreignKeys": {
78
+ "action_test_suites_workspace_id_workspaces_id_fk": {
79
+ "name": "action_test_suites_workspace_id_workspaces_id_fk",
80
+ "tableFrom": "action_test_suites",
81
+ "tableTo": "workspaces",
82
+ "columnsFrom": [
83
+ "workspace_id"
84
+ ],
85
+ "columnsTo": [
86
+ "id"
87
+ ],
88
+ "onDelete": "cascade",
89
+ "onUpdate": "no action"
90
+ },
91
+ "action_test_suites_version_id_action_versions_id_fk": {
92
+ "name": "action_test_suites_version_id_action_versions_id_fk",
93
+ "tableFrom": "action_test_suites",
94
+ "tableTo": "action_versions",
95
+ "columnsFrom": [
96
+ "version_id"
97
+ ],
98
+ "columnsTo": [
99
+ "id"
100
+ ],
101
+ "onDelete": "cascade",
102
+ "onUpdate": "no action"
103
+ }
104
+ },
105
+ "compositePrimaryKeys": {},
106
+ "uniqueConstraints": {},
107
+ "checkConstraints": {}
108
+ },
109
+ "action_versions": {
110
+ "name": "action_versions",
111
+ "columns": {
112
+ "id": {
113
+ "name": "id",
114
+ "type": "text",
115
+ "primaryKey": true,
116
+ "notNull": true,
117
+ "autoincrement": false
118
+ },
119
+ "workspace_id": {
120
+ "name": "workspace_id",
121
+ "type": "integer",
122
+ "primaryKey": false,
123
+ "notNull": true,
124
+ "autoincrement": false
125
+ },
126
+ "action_id": {
127
+ "name": "action_id",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": true,
131
+ "autoincrement": false
132
+ },
133
+ "number": {
134
+ "name": "number",
135
+ "type": "integer",
136
+ "primaryKey": false,
137
+ "notNull": true,
138
+ "autoincrement": false
139
+ },
140
+ "source": {
141
+ "name": "source",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true,
145
+ "autoincrement": false
146
+ },
147
+ "input_schema": {
148
+ "name": "input_schema",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": true,
152
+ "autoincrement": false,
153
+ "default": "'{}'"
154
+ },
155
+ "output_schema": {
156
+ "name": "output_schema",
157
+ "type": "text",
158
+ "primaryKey": false,
159
+ "notNull": true,
160
+ "autoincrement": false,
161
+ "default": "'{}'"
162
+ },
163
+ "validation_mode": {
164
+ "name": "validation_mode",
165
+ "type": "text",
166
+ "primaryKey": false,
167
+ "notNull": true,
168
+ "autoincrement": false,
169
+ "default": "'legacy'"
170
+ },
171
+ "sdk_contract": {
172
+ "name": "sdk_contract",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": true,
176
+ "autoincrement": false,
177
+ "default": "'{}'"
178
+ },
179
+ "promoted_from": {
180
+ "name": "promoted_from",
181
+ "type": "text",
182
+ "primaryKey": false,
183
+ "notNull": false,
184
+ "autoincrement": false
185
+ },
186
+ "created_at": {
187
+ "name": "created_at",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": true,
191
+ "autoincrement": false
192
+ },
193
+ "updated_at": {
194
+ "name": "updated_at",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": true,
198
+ "autoincrement": false
199
+ }
200
+ },
201
+ "indexes": {
202
+ "action_versions_action_id_number_unique": {
203
+ "name": "action_versions_action_id_number_unique",
204
+ "columns": [
205
+ "action_id",
206
+ "number"
207
+ ],
208
+ "isUnique": true
209
+ }
210
+ },
211
+ "foreignKeys": {
212
+ "action_versions_workspace_id_workspaces_id_fk": {
213
+ "name": "action_versions_workspace_id_workspaces_id_fk",
214
+ "tableFrom": "action_versions",
215
+ "tableTo": "workspaces",
216
+ "columnsFrom": [
217
+ "workspace_id"
218
+ ],
219
+ "columnsTo": [
220
+ "id"
221
+ ],
222
+ "onDelete": "cascade",
223
+ "onUpdate": "no action"
224
+ },
225
+ "action_versions_action_id_actions_id_fk": {
226
+ "name": "action_versions_action_id_actions_id_fk",
227
+ "tableFrom": "action_versions",
228
+ "tableTo": "actions",
229
+ "columnsFrom": [
230
+ "action_id"
231
+ ],
232
+ "columnsTo": [
233
+ "id"
234
+ ],
235
+ "onDelete": "cascade",
236
+ "onUpdate": "no action"
237
+ },
238
+ "action_versions_promoted_from_runs_id_fk": {
239
+ "name": "action_versions_promoted_from_runs_id_fk",
240
+ "tableFrom": "action_versions",
241
+ "tableTo": "runs",
242
+ "columnsFrom": [
243
+ "promoted_from"
244
+ ],
245
+ "columnsTo": [
246
+ "id"
247
+ ],
248
+ "onDelete": "restrict",
249
+ "onUpdate": "no action"
250
+ }
251
+ },
252
+ "compositePrimaryKeys": {},
253
+ "uniqueConstraints": {},
254
+ "checkConstraints": {}
255
+ },
256
+ "actions": {
257
+ "name": "actions",
258
+ "columns": {
259
+ "id": {
260
+ "name": "id",
261
+ "type": "text",
262
+ "primaryKey": true,
263
+ "notNull": true,
264
+ "autoincrement": false
265
+ },
266
+ "workspace_id": {
267
+ "name": "workspace_id",
268
+ "type": "integer",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "autoincrement": false
272
+ },
273
+ "project_id": {
274
+ "name": "project_id",
275
+ "type": "text",
276
+ "primaryKey": false,
277
+ "notNull": true,
278
+ "autoincrement": false
279
+ },
280
+ "name": {
281
+ "name": "name",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": true,
285
+ "autoincrement": false
286
+ },
287
+ "description": {
288
+ "name": "description",
289
+ "type": "text",
290
+ "primaryKey": false,
291
+ "notNull": true,
292
+ "autoincrement": false,
293
+ "default": "''"
294
+ },
295
+ "enabled": {
296
+ "name": "enabled",
297
+ "type": "integer",
298
+ "primaryKey": false,
299
+ "notNull": true,
300
+ "autoincrement": false,
301
+ "default": "1"
302
+ },
303
+ "created_at": {
304
+ "name": "created_at",
305
+ "type": "text",
306
+ "primaryKey": false,
307
+ "notNull": true,
308
+ "autoincrement": false
309
+ },
310
+ "updated_at": {
311
+ "name": "updated_at",
312
+ "type": "text",
313
+ "primaryKey": false,
314
+ "notNull": true,
315
+ "autoincrement": false
316
+ }
317
+ },
318
+ "indexes": {},
319
+ "foreignKeys": {
320
+ "actions_workspace_id_workspaces_id_fk": {
321
+ "name": "actions_workspace_id_workspaces_id_fk",
322
+ "tableFrom": "actions",
323
+ "tableTo": "workspaces",
324
+ "columnsFrom": [
325
+ "workspace_id"
326
+ ],
327
+ "columnsTo": [
328
+ "id"
329
+ ],
330
+ "onDelete": "cascade",
331
+ "onUpdate": "no action"
332
+ },
333
+ "actions_project_id_projects_id_fk": {
334
+ "name": "actions_project_id_projects_id_fk",
335
+ "tableFrom": "actions",
336
+ "tableTo": "projects",
337
+ "columnsFrom": [
338
+ "project_id"
339
+ ],
340
+ "columnsTo": [
341
+ "id"
342
+ ],
343
+ "onDelete": "cascade",
344
+ "onUpdate": "no action"
345
+ }
346
+ },
347
+ "compositePrimaryKeys": {},
348
+ "uniqueConstraints": {},
349
+ "checkConstraints": {}
350
+ },
351
+ "audit_records": {
352
+ "name": "audit_records",
353
+ "columns": {
354
+ "id": {
355
+ "name": "id",
356
+ "type": "text",
357
+ "primaryKey": true,
358
+ "notNull": true,
359
+ "autoincrement": false
360
+ },
361
+ "workspace_id": {
362
+ "name": "workspace_id",
363
+ "type": "integer",
364
+ "primaryKey": false,
365
+ "notNull": true,
366
+ "autoincrement": false
367
+ },
368
+ "actor_id": {
369
+ "name": "actor_id",
370
+ "type": "integer",
371
+ "primaryKey": false,
372
+ "notNull": false,
373
+ "autoincrement": false
374
+ },
375
+ "action": {
376
+ "name": "action",
377
+ "type": "text",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "autoincrement": false
381
+ },
382
+ "resource": {
383
+ "name": "resource",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": true,
387
+ "autoincrement": false
388
+ },
389
+ "data": {
390
+ "name": "data",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "autoincrement": false,
395
+ "default": "'{}'"
396
+ },
397
+ "created_at": {
398
+ "name": "created_at",
399
+ "type": "text",
400
+ "primaryKey": false,
401
+ "notNull": true,
402
+ "autoincrement": false
403
+ },
404
+ "updated_at": {
405
+ "name": "updated_at",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "autoincrement": false
410
+ }
411
+ },
412
+ "indexes": {},
413
+ "foreignKeys": {
414
+ "audit_records_workspace_id_workspaces_id_fk": {
415
+ "name": "audit_records_workspace_id_workspaces_id_fk",
416
+ "tableFrom": "audit_records",
417
+ "tableTo": "workspaces",
418
+ "columnsFrom": [
419
+ "workspace_id"
420
+ ],
421
+ "columnsTo": [
422
+ "id"
423
+ ],
424
+ "onDelete": "cascade",
425
+ "onUpdate": "no action"
426
+ },
427
+ "audit_records_actor_id_users_id_fk": {
428
+ "name": "audit_records_actor_id_users_id_fk",
429
+ "tableFrom": "audit_records",
430
+ "tableTo": "users",
431
+ "columnsFrom": [
432
+ "actor_id"
433
+ ],
434
+ "columnsTo": [
435
+ "id"
436
+ ],
437
+ "onDelete": "set null",
438
+ "onUpdate": "no action"
439
+ }
440
+ },
441
+ "compositePrimaryKeys": {},
442
+ "uniqueConstraints": {},
443
+ "checkConstraints": {}
444
+ },
445
+ "conversations": {
446
+ "name": "conversations",
447
+ "columns": {
448
+ "id": {
449
+ "name": "id",
450
+ "type": "text",
451
+ "primaryKey": true,
452
+ "notNull": true,
453
+ "autoincrement": false
454
+ },
455
+ "workspace_id": {
456
+ "name": "workspace_id",
457
+ "type": "integer",
458
+ "primaryKey": false,
459
+ "notNull": true,
460
+ "autoincrement": false
461
+ },
462
+ "project_id": {
463
+ "name": "project_id",
464
+ "type": "text",
465
+ "primaryKey": false,
466
+ "notNull": true,
467
+ "autoincrement": false
468
+ },
469
+ "title": {
470
+ "name": "title",
471
+ "type": "text",
472
+ "primaryKey": false,
473
+ "notNull": true,
474
+ "autoincrement": false,
475
+ "default": "'New conversation'"
476
+ },
477
+ "created_at": {
478
+ "name": "created_at",
479
+ "type": "text",
480
+ "primaryKey": false,
481
+ "notNull": true,
482
+ "autoincrement": false
483
+ },
484
+ "updated_at": {
485
+ "name": "updated_at",
486
+ "type": "text",
487
+ "primaryKey": false,
488
+ "notNull": true,
489
+ "autoincrement": false
490
+ }
491
+ },
492
+ "indexes": {},
493
+ "foreignKeys": {
494
+ "conversations_workspace_id_workspaces_id_fk": {
495
+ "name": "conversations_workspace_id_workspaces_id_fk",
496
+ "tableFrom": "conversations",
497
+ "tableTo": "workspaces",
498
+ "columnsFrom": [
499
+ "workspace_id"
500
+ ],
501
+ "columnsTo": [
502
+ "id"
503
+ ],
504
+ "onDelete": "cascade",
505
+ "onUpdate": "no action"
506
+ },
507
+ "conversations_project_id_projects_id_fk": {
508
+ "name": "conversations_project_id_projects_id_fk",
509
+ "tableFrom": "conversations",
510
+ "tableTo": "projects",
511
+ "columnsFrom": [
512
+ "project_id"
513
+ ],
514
+ "columnsTo": [
515
+ "id"
516
+ ],
517
+ "onDelete": "restrict",
518
+ "onUpdate": "no action"
519
+ }
520
+ },
521
+ "compositePrimaryKeys": {},
522
+ "uniqueConstraints": {},
523
+ "checkConstraints": {}
524
+ },
525
+ "schedules": {
526
+ "name": "schedules",
527
+ "columns": {
528
+ "id": {
529
+ "name": "id",
530
+ "type": "text",
531
+ "primaryKey": true,
532
+ "notNull": true,
533
+ "autoincrement": false
534
+ },
535
+ "workspace_id": {
536
+ "name": "workspace_id",
537
+ "type": "integer",
538
+ "primaryKey": false,
539
+ "notNull": true,
540
+ "autoincrement": false
541
+ },
542
+ "action_id": {
543
+ "name": "action_id",
544
+ "type": "text",
545
+ "primaryKey": false,
546
+ "notNull": true,
547
+ "autoincrement": false
548
+ },
549
+ "actor_id": {
550
+ "name": "actor_id",
551
+ "type": "integer",
552
+ "primaryKey": false,
553
+ "notNull": true,
554
+ "autoincrement": false
555
+ },
556
+ "cron": {
557
+ "name": "cron",
558
+ "type": "text",
559
+ "primaryKey": false,
560
+ "notNull": true,
561
+ "autoincrement": false
562
+ },
563
+ "inputs": {
564
+ "name": "inputs",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": true,
568
+ "autoincrement": false,
569
+ "default": "'{}'"
570
+ },
571
+ "enabled": {
572
+ "name": "enabled",
573
+ "type": "integer",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false,
577
+ "default": "1"
578
+ },
579
+ "next_run_at": {
580
+ "name": "next_run_at",
581
+ "type": "text",
582
+ "primaryKey": false,
583
+ "notNull": true,
584
+ "autoincrement": false
585
+ },
586
+ "created_at": {
587
+ "name": "created_at",
588
+ "type": "text",
589
+ "primaryKey": false,
590
+ "notNull": true,
591
+ "autoincrement": false
592
+ },
593
+ "updated_at": {
594
+ "name": "updated_at",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": true,
598
+ "autoincrement": false
599
+ }
600
+ },
601
+ "indexes": {},
602
+ "foreignKeys": {
603
+ "schedules_workspace_id_workspaces_id_fk": {
604
+ "name": "schedules_workspace_id_workspaces_id_fk",
605
+ "tableFrom": "schedules",
606
+ "tableTo": "workspaces",
607
+ "columnsFrom": [
608
+ "workspace_id"
609
+ ],
610
+ "columnsTo": [
611
+ "id"
612
+ ],
613
+ "onDelete": "cascade",
614
+ "onUpdate": "no action"
615
+ },
616
+ "schedules_action_id_actions_id_fk": {
617
+ "name": "schedules_action_id_actions_id_fk",
618
+ "tableFrom": "schedules",
619
+ "tableTo": "actions",
620
+ "columnsFrom": [
621
+ "action_id"
622
+ ],
623
+ "columnsTo": [
624
+ "id"
625
+ ],
626
+ "onDelete": "cascade",
627
+ "onUpdate": "no action"
628
+ },
629
+ "schedules_actor_id_users_id_fk": {
630
+ "name": "schedules_actor_id_users_id_fk",
631
+ "tableFrom": "schedules",
632
+ "tableTo": "users",
633
+ "columnsFrom": [
634
+ "actor_id"
635
+ ],
636
+ "columnsTo": [
637
+ "id"
638
+ ],
639
+ "onDelete": "restrict",
640
+ "onUpdate": "no action"
641
+ }
642
+ },
643
+ "compositePrimaryKeys": {},
644
+ "uniqueConstraints": {},
645
+ "checkConstraints": {}
646
+ },
647
+ "webhook_deliveries": {
648
+ "name": "webhook_deliveries",
649
+ "columns": {
650
+ "id": {
651
+ "name": "id",
652
+ "type": "text",
653
+ "primaryKey": true,
654
+ "notNull": true,
655
+ "autoincrement": false
656
+ },
657
+ "workspace_id": {
658
+ "name": "workspace_id",
659
+ "type": "integer",
660
+ "primaryKey": false,
661
+ "notNull": true,
662
+ "autoincrement": false
663
+ },
664
+ "webhook_id": {
665
+ "name": "webhook_id",
666
+ "type": "text",
667
+ "primaryKey": false,
668
+ "notNull": true,
669
+ "autoincrement": false
670
+ },
671
+ "delivery_id": {
672
+ "name": "delivery_id",
673
+ "type": "text",
674
+ "primaryKey": false,
675
+ "notNull": true,
676
+ "autoincrement": false
677
+ },
678
+ "payload_hash": {
679
+ "name": "payload_hash",
680
+ "type": "text",
681
+ "primaryKey": false,
682
+ "notNull": true,
683
+ "autoincrement": false
684
+ },
685
+ "outcome": {
686
+ "name": "outcome",
687
+ "type": "text",
688
+ "primaryKey": false,
689
+ "notNull": true,
690
+ "autoincrement": false
691
+ },
692
+ "run_id": {
693
+ "name": "run_id",
694
+ "type": "text",
695
+ "primaryKey": false,
696
+ "notNull": false,
697
+ "autoincrement": false
698
+ },
699
+ "created_at": {
700
+ "name": "created_at",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "autoincrement": false
705
+ },
706
+ "updated_at": {
707
+ "name": "updated_at",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ }
713
+ },
714
+ "indexes": {
715
+ "webhook_deliveries_webhook_id_delivery_id_unique": {
716
+ "name": "webhook_deliveries_webhook_id_delivery_id_unique",
717
+ "columns": [
718
+ "webhook_id",
719
+ "delivery_id"
720
+ ],
721
+ "isUnique": true
722
+ }
723
+ },
724
+ "foreignKeys": {
725
+ "webhook_deliveries_workspace_id_workspaces_id_fk": {
726
+ "name": "webhook_deliveries_workspace_id_workspaces_id_fk",
727
+ "tableFrom": "webhook_deliveries",
728
+ "tableTo": "workspaces",
729
+ "columnsFrom": [
730
+ "workspace_id"
731
+ ],
732
+ "columnsTo": [
733
+ "id"
734
+ ],
735
+ "onDelete": "cascade",
736
+ "onUpdate": "no action"
737
+ },
738
+ "webhook_deliveries_webhook_id_webhooks_id_fk": {
739
+ "name": "webhook_deliveries_webhook_id_webhooks_id_fk",
740
+ "tableFrom": "webhook_deliveries",
741
+ "tableTo": "webhooks",
742
+ "columnsFrom": [
743
+ "webhook_id"
744
+ ],
745
+ "columnsTo": [
746
+ "id"
747
+ ],
748
+ "onDelete": "cascade",
749
+ "onUpdate": "no action"
750
+ },
751
+ "webhook_deliveries_run_id_runs_id_fk": {
752
+ "name": "webhook_deliveries_run_id_runs_id_fk",
753
+ "tableFrom": "webhook_deliveries",
754
+ "tableTo": "runs",
755
+ "columnsFrom": [
756
+ "run_id"
757
+ ],
758
+ "columnsTo": [
759
+ "id"
760
+ ],
761
+ "onDelete": "set null",
762
+ "onUpdate": "no action"
763
+ }
764
+ },
765
+ "compositePrimaryKeys": {},
766
+ "uniqueConstraints": {},
767
+ "checkConstraints": {}
768
+ },
769
+ "webhooks": {
770
+ "name": "webhooks",
771
+ "columns": {
772
+ "id": {
773
+ "name": "id",
774
+ "type": "text",
775
+ "primaryKey": true,
776
+ "notNull": true,
777
+ "autoincrement": false
778
+ },
779
+ "workspace_id": {
780
+ "name": "workspace_id",
781
+ "type": "integer",
782
+ "primaryKey": false,
783
+ "notNull": true,
784
+ "autoincrement": false
785
+ },
786
+ "name": {
787
+ "name": "name",
788
+ "type": "text",
789
+ "primaryKey": false,
790
+ "notNull": true,
791
+ "autoincrement": false
792
+ },
793
+ "action_version_id": {
794
+ "name": "action_version_id",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "autoincrement": false
799
+ },
800
+ "actor_id": {
801
+ "name": "actor_id",
802
+ "type": "integer",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "autoincrement": false
806
+ },
807
+ "secret_hash": {
808
+ "name": "secret_hash",
809
+ "type": "text",
810
+ "primaryKey": false,
811
+ "notNull": true,
812
+ "autoincrement": false
813
+ },
814
+ "enabled": {
815
+ "name": "enabled",
816
+ "type": "integer",
817
+ "primaryKey": false,
818
+ "notNull": true,
819
+ "autoincrement": false,
820
+ "default": "1"
821
+ },
822
+ "rotated_at": {
823
+ "name": "rotated_at",
824
+ "type": "text",
825
+ "primaryKey": false,
826
+ "notNull": true,
827
+ "autoincrement": false
828
+ },
829
+ "last_received_at": {
830
+ "name": "last_received_at",
831
+ "type": "text",
832
+ "primaryKey": false,
833
+ "notNull": false,
834
+ "autoincrement": false
835
+ },
836
+ "last_accepted_at": {
837
+ "name": "last_accepted_at",
838
+ "type": "text",
839
+ "primaryKey": false,
840
+ "notNull": false,
841
+ "autoincrement": false
842
+ },
843
+ "last_rejection": {
844
+ "name": "last_rejection",
845
+ "type": "text",
846
+ "primaryKey": false,
847
+ "notNull": true,
848
+ "autoincrement": false,
849
+ "default": "''"
850
+ },
851
+ "last_rejected_at": {
852
+ "name": "last_rejected_at",
853
+ "type": "text",
854
+ "primaryKey": false,
855
+ "notNull": false,
856
+ "autoincrement": false
857
+ },
858
+ "created_at": {
859
+ "name": "created_at",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": true,
863
+ "autoincrement": false
864
+ },
865
+ "updated_at": {
866
+ "name": "updated_at",
867
+ "type": "text",
868
+ "primaryKey": false,
869
+ "notNull": true,
870
+ "autoincrement": false
871
+ }
872
+ },
873
+ "indexes": {},
874
+ "foreignKeys": {
875
+ "webhooks_workspace_id_workspaces_id_fk": {
876
+ "name": "webhooks_workspace_id_workspaces_id_fk",
877
+ "tableFrom": "webhooks",
878
+ "tableTo": "workspaces",
879
+ "columnsFrom": [
880
+ "workspace_id"
881
+ ],
882
+ "columnsTo": [
883
+ "id"
884
+ ],
885
+ "onDelete": "cascade",
886
+ "onUpdate": "no action"
887
+ },
888
+ "webhooks_action_version_id_action_versions_id_fk": {
889
+ "name": "webhooks_action_version_id_action_versions_id_fk",
890
+ "tableFrom": "webhooks",
891
+ "tableTo": "action_versions",
892
+ "columnsFrom": [
893
+ "action_version_id"
894
+ ],
895
+ "columnsTo": [
896
+ "id"
897
+ ],
898
+ "onDelete": "restrict",
899
+ "onUpdate": "no action"
900
+ },
901
+ "webhooks_actor_id_users_id_fk": {
902
+ "name": "webhooks_actor_id_users_id_fk",
903
+ "tableFrom": "webhooks",
904
+ "tableTo": "users",
905
+ "columnsFrom": [
906
+ "actor_id"
907
+ ],
908
+ "columnsTo": [
909
+ "id"
910
+ ],
911
+ "onDelete": "restrict",
912
+ "onUpdate": "no action"
913
+ }
914
+ },
915
+ "compositePrimaryKeys": {},
916
+ "uniqueConstraints": {},
917
+ "checkConstraints": {}
918
+ },
919
+ "invitations": {
920
+ "name": "invitations",
921
+ "columns": {
922
+ "id": {
923
+ "name": "id",
924
+ "type": "integer",
925
+ "primaryKey": true,
926
+ "notNull": true,
927
+ "autoincrement": true
928
+ },
929
+ "workspace_id": {
930
+ "name": "workspace_id",
931
+ "type": "integer",
932
+ "primaryKey": false,
933
+ "notNull": true,
934
+ "autoincrement": false
935
+ },
936
+ "email": {
937
+ "name": "email",
938
+ "type": "text",
939
+ "primaryKey": false,
940
+ "notNull": true,
941
+ "autoincrement": false
942
+ },
943
+ "role": {
944
+ "name": "role",
945
+ "type": "text",
946
+ "primaryKey": false,
947
+ "notNull": true,
948
+ "autoincrement": false
949
+ },
950
+ "token_digest": {
951
+ "name": "token_digest",
952
+ "type": "text",
953
+ "primaryKey": false,
954
+ "notNull": true,
955
+ "autoincrement": false
956
+ },
957
+ "expires_at": {
958
+ "name": "expires_at",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": true,
962
+ "autoincrement": false
963
+ },
964
+ "accepted_at": {
965
+ "name": "accepted_at",
966
+ "type": "text",
967
+ "primaryKey": false,
968
+ "notNull": false,
969
+ "autoincrement": false
970
+ },
971
+ "revoked_at": {
972
+ "name": "revoked_at",
973
+ "type": "text",
974
+ "primaryKey": false,
975
+ "notNull": false,
976
+ "autoincrement": false
977
+ }
978
+ },
979
+ "indexes": {
980
+ "one_pending_invitation": {
981
+ "name": "one_pending_invitation",
982
+ "columns": [
983
+ "workspace_id",
984
+ "\"email\" COLLATE NOCASE"
985
+ ],
986
+ "isUnique": true,
987
+ "where": "\"invitations\".\"accepted_at\" IS NULL AND \"invitations\".\"revoked_at\" IS NULL"
988
+ },
989
+ "invitations_token_digest_unique": {
990
+ "name": "invitations_token_digest_unique",
991
+ "columns": [
992
+ "token_digest"
993
+ ],
994
+ "isUnique": true
995
+ }
996
+ },
997
+ "foreignKeys": {
998
+ "invitations_workspace_id_workspaces_id_fk": {
999
+ "name": "invitations_workspace_id_workspaces_id_fk",
1000
+ "tableFrom": "invitations",
1001
+ "tableTo": "workspaces",
1002
+ "columnsFrom": [
1003
+ "workspace_id"
1004
+ ],
1005
+ "columnsTo": [
1006
+ "id"
1007
+ ],
1008
+ "onDelete": "no action",
1009
+ "onUpdate": "no action"
1010
+ }
1011
+ },
1012
+ "compositePrimaryKeys": {},
1013
+ "uniqueConstraints": {},
1014
+ "checkConstraints": {
1015
+ "invitations_role_check": {
1016
+ "name": "invitations_role_check",
1017
+ "value": "\"invitations\".\"role\" IN ('admin','member')"
1018
+ }
1019
+ }
1020
+ },
1021
+ "memberships": {
1022
+ "name": "memberships",
1023
+ "columns": {
1024
+ "id": {
1025
+ "name": "id",
1026
+ "type": "integer",
1027
+ "primaryKey": true,
1028
+ "notNull": true,
1029
+ "autoincrement": true
1030
+ },
1031
+ "workspace_id": {
1032
+ "name": "workspace_id",
1033
+ "type": "integer",
1034
+ "primaryKey": false,
1035
+ "notNull": true,
1036
+ "autoincrement": false
1037
+ },
1038
+ "user_id": {
1039
+ "name": "user_id",
1040
+ "type": "integer",
1041
+ "primaryKey": false,
1042
+ "notNull": true,
1043
+ "autoincrement": false
1044
+ },
1045
+ "role": {
1046
+ "name": "role",
1047
+ "type": "text",
1048
+ "primaryKey": false,
1049
+ "notNull": true,
1050
+ "autoincrement": false
1051
+ }
1052
+ },
1053
+ "indexes": {
1054
+ "one_workspace_owner": {
1055
+ "name": "one_workspace_owner",
1056
+ "columns": [
1057
+ "workspace_id"
1058
+ ],
1059
+ "isUnique": true,
1060
+ "where": "\"memberships\".\"role\"='owner'"
1061
+ },
1062
+ "memberships_workspace_id_user_id_unique": {
1063
+ "name": "memberships_workspace_id_user_id_unique",
1064
+ "columns": [
1065
+ "workspace_id",
1066
+ "user_id"
1067
+ ],
1068
+ "isUnique": true
1069
+ }
1070
+ },
1071
+ "foreignKeys": {
1072
+ "memberships_workspace_id_workspaces_id_fk": {
1073
+ "name": "memberships_workspace_id_workspaces_id_fk",
1074
+ "tableFrom": "memberships",
1075
+ "tableTo": "workspaces",
1076
+ "columnsFrom": [
1077
+ "workspace_id"
1078
+ ],
1079
+ "columnsTo": [
1080
+ "id"
1081
+ ],
1082
+ "onDelete": "no action",
1083
+ "onUpdate": "no action"
1084
+ },
1085
+ "memberships_user_id_users_id_fk": {
1086
+ "name": "memberships_user_id_users_id_fk",
1087
+ "tableFrom": "memberships",
1088
+ "tableTo": "users",
1089
+ "columnsFrom": [
1090
+ "user_id"
1091
+ ],
1092
+ "columnsTo": [
1093
+ "id"
1094
+ ],
1095
+ "onDelete": "no action",
1096
+ "onUpdate": "no action"
1097
+ }
1098
+ },
1099
+ "compositePrimaryKeys": {},
1100
+ "uniqueConstraints": {},
1101
+ "checkConstraints": {
1102
+ "memberships_role_check": {
1103
+ "name": "memberships_role_check",
1104
+ "value": "\"memberships\".\"role\" IN ('owner','admin','member')"
1105
+ }
1106
+ }
1107
+ },
1108
+ "sessions": {
1109
+ "name": "sessions",
1110
+ "columns": {
1111
+ "id": {
1112
+ "name": "id",
1113
+ "type": "text",
1114
+ "primaryKey": true,
1115
+ "notNull": true,
1116
+ "autoincrement": false
1117
+ },
1118
+ "user_id": {
1119
+ "name": "user_id",
1120
+ "type": "integer",
1121
+ "primaryKey": false,
1122
+ "notNull": false,
1123
+ "autoincrement": false
1124
+ },
1125
+ "pending_user_id": {
1126
+ "name": "pending_user_id",
1127
+ "type": "integer",
1128
+ "primaryKey": false,
1129
+ "notNull": false,
1130
+ "autoincrement": false
1131
+ },
1132
+ "workspace_id": {
1133
+ "name": "workspace_id",
1134
+ "type": "integer",
1135
+ "primaryKey": false,
1136
+ "notNull": false,
1137
+ "autoincrement": false
1138
+ },
1139
+ "expires_at": {
1140
+ "name": "expires_at",
1141
+ "type": "integer",
1142
+ "primaryKey": false,
1143
+ "notNull": true,
1144
+ "autoincrement": false
1145
+ },
1146
+ "reauthenticated_at": {
1147
+ "name": "reauthenticated_at",
1148
+ "type": "integer",
1149
+ "primaryKey": false,
1150
+ "notNull": false,
1151
+ "autoincrement": false
1152
+ }
1153
+ },
1154
+ "indexes": {},
1155
+ "foreignKeys": {
1156
+ "sessions_user_id_users_id_fk": {
1157
+ "name": "sessions_user_id_users_id_fk",
1158
+ "tableFrom": "sessions",
1159
+ "tableTo": "users",
1160
+ "columnsFrom": [
1161
+ "user_id"
1162
+ ],
1163
+ "columnsTo": [
1164
+ "id"
1165
+ ],
1166
+ "onDelete": "no action",
1167
+ "onUpdate": "no action"
1168
+ },
1169
+ "sessions_pending_user_id_users_id_fk": {
1170
+ "name": "sessions_pending_user_id_users_id_fk",
1171
+ "tableFrom": "sessions",
1172
+ "tableTo": "users",
1173
+ "columnsFrom": [
1174
+ "pending_user_id"
1175
+ ],
1176
+ "columnsTo": [
1177
+ "id"
1178
+ ],
1179
+ "onDelete": "no action",
1180
+ "onUpdate": "no action"
1181
+ },
1182
+ "sessions_workspace_id_workspaces_id_fk": {
1183
+ "name": "sessions_workspace_id_workspaces_id_fk",
1184
+ "tableFrom": "sessions",
1185
+ "tableTo": "workspaces",
1186
+ "columnsFrom": [
1187
+ "workspace_id"
1188
+ ],
1189
+ "columnsTo": [
1190
+ "id"
1191
+ ],
1192
+ "onDelete": "no action",
1193
+ "onUpdate": "no action"
1194
+ }
1195
+ },
1196
+ "compositePrimaryKeys": {},
1197
+ "uniqueConstraints": {},
1198
+ "checkConstraints": {}
1199
+ },
1200
+ "users": {
1201
+ "name": "users",
1202
+ "columns": {
1203
+ "id": {
1204
+ "name": "id",
1205
+ "type": "integer",
1206
+ "primaryKey": true,
1207
+ "notNull": true,
1208
+ "autoincrement": true
1209
+ },
1210
+ "username": {
1211
+ "name": "username",
1212
+ "type": "text",
1213
+ "primaryKey": false,
1214
+ "notNull": true,
1215
+ "autoincrement": false
1216
+ },
1217
+ "email": {
1218
+ "name": "email",
1219
+ "type": "text",
1220
+ "primaryKey": false,
1221
+ "notNull": true,
1222
+ "autoincrement": false
1223
+ },
1224
+ "password_hash": {
1225
+ "name": "password_hash",
1226
+ "type": "text",
1227
+ "primaryKey": false,
1228
+ "notNull": true,
1229
+ "autoincrement": false
1230
+ },
1231
+ "first_name": {
1232
+ "name": "first_name",
1233
+ "type": "text",
1234
+ "primaryKey": false,
1235
+ "notNull": true,
1236
+ "autoincrement": false,
1237
+ "default": "''"
1238
+ },
1239
+ "last_name": {
1240
+ "name": "last_name",
1241
+ "type": "text",
1242
+ "primaryKey": false,
1243
+ "notNull": true,
1244
+ "autoincrement": false,
1245
+ "default": "''"
1246
+ },
1247
+ "totp_secret": {
1248
+ "name": "totp_secret",
1249
+ "type": "text",
1250
+ "primaryKey": false,
1251
+ "notNull": false,
1252
+ "autoincrement": false
1253
+ },
1254
+ "pending_totp_secret": {
1255
+ "name": "pending_totp_secret",
1256
+ "type": "text",
1257
+ "primaryKey": false,
1258
+ "notNull": false,
1259
+ "autoincrement": false
1260
+ },
1261
+ "totp_last_counter": {
1262
+ "name": "totp_last_counter",
1263
+ "type": "integer",
1264
+ "primaryKey": false,
1265
+ "notNull": false,
1266
+ "autoincrement": false
1267
+ },
1268
+ "recovery_codes": {
1269
+ "name": "recovery_codes",
1270
+ "type": "text",
1271
+ "primaryKey": false,
1272
+ "notNull": true,
1273
+ "autoincrement": false,
1274
+ "default": "'[]'"
1275
+ }
1276
+ },
1277
+ "indexes": {
1278
+ "users_email_unique": {
1279
+ "name": "users_email_unique",
1280
+ "columns": [
1281
+ "\"email\" COLLATE NOCASE"
1282
+ ],
1283
+ "isUnique": true
1284
+ },
1285
+ "users_username_unique": {
1286
+ "name": "users_username_unique",
1287
+ "columns": [
1288
+ "\"username\" COLLATE NOCASE"
1289
+ ],
1290
+ "isUnique": true
1291
+ }
1292
+ },
1293
+ "foreignKeys": {},
1294
+ "compositePrimaryKeys": {},
1295
+ "uniqueConstraints": {},
1296
+ "checkConstraints": {}
1297
+ },
1298
+ "workspaces": {
1299
+ "name": "workspaces",
1300
+ "columns": {
1301
+ "id": {
1302
+ "name": "id",
1303
+ "type": "integer",
1304
+ "primaryKey": true,
1305
+ "notNull": true,
1306
+ "autoincrement": true
1307
+ },
1308
+ "name": {
1309
+ "name": "name",
1310
+ "type": "text",
1311
+ "primaryKey": false,
1312
+ "notNull": true,
1313
+ "autoincrement": false
1314
+ },
1315
+ "host": {
1316
+ "name": "host",
1317
+ "type": "text",
1318
+ "primaryKey": false,
1319
+ "notNull": true,
1320
+ "autoincrement": false
1321
+ },
1322
+ "created_at": {
1323
+ "name": "created_at",
1324
+ "type": "text",
1325
+ "primaryKey": false,
1326
+ "notNull": true,
1327
+ "autoincrement": false
1328
+ }
1329
+ },
1330
+ "indexes": {
1331
+ "workspaces_host_unique": {
1332
+ "name": "workspaces_host_unique",
1333
+ "columns": [
1334
+ "\"host\" COLLATE NOCASE"
1335
+ ],
1336
+ "isUnique": true
1337
+ }
1338
+ },
1339
+ "foreignKeys": {},
1340
+ "compositePrimaryKeys": {},
1341
+ "uniqueConstraints": {},
1342
+ "checkConstraints": {}
1343
+ },
1344
+ "documents": {
1345
+ "name": "documents",
1346
+ "columns": {
1347
+ "id": {
1348
+ "name": "id",
1349
+ "type": "text",
1350
+ "primaryKey": true,
1351
+ "notNull": true,
1352
+ "autoincrement": false
1353
+ },
1354
+ "workspace_id": {
1355
+ "name": "workspace_id",
1356
+ "type": "integer",
1357
+ "primaryKey": false,
1358
+ "notNull": true,
1359
+ "autoincrement": false
1360
+ },
1361
+ "kind": {
1362
+ "name": "kind",
1363
+ "type": "text",
1364
+ "primaryKey": false,
1365
+ "notNull": true,
1366
+ "autoincrement": false
1367
+ },
1368
+ "title": {
1369
+ "name": "title",
1370
+ "type": "text",
1371
+ "primaryKey": false,
1372
+ "notNull": true,
1373
+ "autoincrement": false
1374
+ },
1375
+ "content": {
1376
+ "name": "content",
1377
+ "type": "text",
1378
+ "primaryKey": false,
1379
+ "notNull": true,
1380
+ "autoincrement": false,
1381
+ "default": "''"
1382
+ },
1383
+ "created_at": {
1384
+ "name": "created_at",
1385
+ "type": "text",
1386
+ "primaryKey": false,
1387
+ "notNull": true,
1388
+ "autoincrement": false
1389
+ },
1390
+ "updated_at": {
1391
+ "name": "updated_at",
1392
+ "type": "text",
1393
+ "primaryKey": false,
1394
+ "notNull": true,
1395
+ "autoincrement": false
1396
+ }
1397
+ },
1398
+ "indexes": {},
1399
+ "foreignKeys": {
1400
+ "documents_workspace_id_workspaces_id_fk": {
1401
+ "name": "documents_workspace_id_workspaces_id_fk",
1402
+ "tableFrom": "documents",
1403
+ "tableTo": "workspaces",
1404
+ "columnsFrom": [
1405
+ "workspace_id"
1406
+ ],
1407
+ "columnsTo": [
1408
+ "id"
1409
+ ],
1410
+ "onDelete": "cascade",
1411
+ "onUpdate": "no action"
1412
+ }
1413
+ },
1414
+ "compositePrimaryKeys": {},
1415
+ "uniqueConstraints": {},
1416
+ "checkConstraints": {}
1417
+ },
1418
+ "table_rows": {
1419
+ "name": "table_rows",
1420
+ "columns": {
1421
+ "id": {
1422
+ "name": "id",
1423
+ "type": "text",
1424
+ "primaryKey": true,
1425
+ "notNull": true,
1426
+ "autoincrement": false
1427
+ },
1428
+ "workspace_id": {
1429
+ "name": "workspace_id",
1430
+ "type": "integer",
1431
+ "primaryKey": false,
1432
+ "notNull": true,
1433
+ "autoincrement": false
1434
+ },
1435
+ "table_id": {
1436
+ "name": "table_id",
1437
+ "type": "text",
1438
+ "primaryKey": false,
1439
+ "notNull": true,
1440
+ "autoincrement": false
1441
+ },
1442
+ "values": {
1443
+ "name": "values",
1444
+ "type": "text",
1445
+ "primaryKey": false,
1446
+ "notNull": true,
1447
+ "autoincrement": false
1448
+ },
1449
+ "revision": {
1450
+ "name": "revision",
1451
+ "type": "integer",
1452
+ "primaryKey": false,
1453
+ "notNull": true,
1454
+ "autoincrement": false,
1455
+ "default": "1"
1456
+ },
1457
+ "created_at": {
1458
+ "name": "created_at",
1459
+ "type": "text",
1460
+ "primaryKey": false,
1461
+ "notNull": true,
1462
+ "autoincrement": false
1463
+ },
1464
+ "updated_at": {
1465
+ "name": "updated_at",
1466
+ "type": "text",
1467
+ "primaryKey": false,
1468
+ "notNull": true,
1469
+ "autoincrement": false
1470
+ }
1471
+ },
1472
+ "indexes": {},
1473
+ "foreignKeys": {
1474
+ "table_rows_workspace_id_workspaces_id_fk": {
1475
+ "name": "table_rows_workspace_id_workspaces_id_fk",
1476
+ "tableFrom": "table_rows",
1477
+ "tableTo": "workspaces",
1478
+ "columnsFrom": [
1479
+ "workspace_id"
1480
+ ],
1481
+ "columnsTo": [
1482
+ "id"
1483
+ ],
1484
+ "onDelete": "cascade",
1485
+ "onUpdate": "no action"
1486
+ },
1487
+ "table_rows_table_id_workspace_tables_id_fk": {
1488
+ "name": "table_rows_table_id_workspace_tables_id_fk",
1489
+ "tableFrom": "table_rows",
1490
+ "tableTo": "workspace_tables",
1491
+ "columnsFrom": [
1492
+ "table_id"
1493
+ ],
1494
+ "columnsTo": [
1495
+ "id"
1496
+ ],
1497
+ "onDelete": "cascade",
1498
+ "onUpdate": "no action"
1499
+ }
1500
+ },
1501
+ "compositePrimaryKeys": {},
1502
+ "uniqueConstraints": {},
1503
+ "checkConstraints": {}
1504
+ },
1505
+ "workspace_tables": {
1506
+ "name": "workspace_tables",
1507
+ "columns": {
1508
+ "id": {
1509
+ "name": "id",
1510
+ "type": "text",
1511
+ "primaryKey": true,
1512
+ "notNull": true,
1513
+ "autoincrement": false
1514
+ },
1515
+ "workspace_id": {
1516
+ "name": "workspace_id",
1517
+ "type": "integer",
1518
+ "primaryKey": false,
1519
+ "notNull": true,
1520
+ "autoincrement": false
1521
+ },
1522
+ "name": {
1523
+ "name": "name",
1524
+ "type": "text",
1525
+ "primaryKey": false,
1526
+ "notNull": true,
1527
+ "autoincrement": false
1528
+ },
1529
+ "columns": {
1530
+ "name": "columns",
1531
+ "type": "text",
1532
+ "primaryKey": false,
1533
+ "notNull": true,
1534
+ "autoincrement": false
1535
+ },
1536
+ "revision": {
1537
+ "name": "revision",
1538
+ "type": "integer",
1539
+ "primaryKey": false,
1540
+ "notNull": true,
1541
+ "autoincrement": false,
1542
+ "default": "1"
1543
+ },
1544
+ "created_at": {
1545
+ "name": "created_at",
1546
+ "type": "text",
1547
+ "primaryKey": false,
1548
+ "notNull": true,
1549
+ "autoincrement": false
1550
+ },
1551
+ "updated_at": {
1552
+ "name": "updated_at",
1553
+ "type": "text",
1554
+ "primaryKey": false,
1555
+ "notNull": true,
1556
+ "autoincrement": false
1557
+ }
1558
+ },
1559
+ "indexes": {},
1560
+ "foreignKeys": {
1561
+ "workspace_tables_workspace_id_workspaces_id_fk": {
1562
+ "name": "workspace_tables_workspace_id_workspaces_id_fk",
1563
+ "tableFrom": "workspace_tables",
1564
+ "tableTo": "workspaces",
1565
+ "columnsFrom": [
1566
+ "workspace_id"
1567
+ ],
1568
+ "columnsTo": [
1569
+ "id"
1570
+ ],
1571
+ "onDelete": "cascade",
1572
+ "onUpdate": "no action"
1573
+ }
1574
+ },
1575
+ "compositePrimaryKeys": {},
1576
+ "uniqueConstraints": {},
1577
+ "checkConstraints": {}
1578
+ },
1579
+ "auth_attempts": {
1580
+ "name": "auth_attempts",
1581
+ "columns": {
1582
+ "key": {
1583
+ "name": "key",
1584
+ "type": "text",
1585
+ "primaryKey": true,
1586
+ "notNull": true,
1587
+ "autoincrement": false
1588
+ },
1589
+ "count": {
1590
+ "name": "count",
1591
+ "type": "integer",
1592
+ "primaryKey": false,
1593
+ "notNull": true,
1594
+ "autoincrement": false
1595
+ },
1596
+ "expires_at": {
1597
+ "name": "expires_at",
1598
+ "type": "integer",
1599
+ "primaryKey": false,
1600
+ "notNull": true,
1601
+ "autoincrement": false
1602
+ }
1603
+ },
1604
+ "indexes": {},
1605
+ "foreignKeys": {},
1606
+ "compositePrimaryKeys": {},
1607
+ "uniqueConstraints": {},
1608
+ "checkConstraints": {}
1609
+ },
1610
+ "mail_outbox": {
1611
+ "name": "mail_outbox",
1612
+ "columns": {
1613
+ "id": {
1614
+ "name": "id",
1615
+ "type": "text",
1616
+ "primaryKey": true,
1617
+ "notNull": true,
1618
+ "autoincrement": false
1619
+ },
1620
+ "recipient": {
1621
+ "name": "recipient",
1622
+ "type": "text",
1623
+ "primaryKey": false,
1624
+ "notNull": true,
1625
+ "autoincrement": false
1626
+ },
1627
+ "subject": {
1628
+ "name": "subject",
1629
+ "type": "text",
1630
+ "primaryKey": false,
1631
+ "notNull": true,
1632
+ "autoincrement": false
1633
+ },
1634
+ "body": {
1635
+ "name": "body",
1636
+ "type": "text",
1637
+ "primaryKey": false,
1638
+ "notNull": true,
1639
+ "autoincrement": false
1640
+ },
1641
+ "attempts": {
1642
+ "name": "attempts",
1643
+ "type": "integer",
1644
+ "primaryKey": false,
1645
+ "notNull": true,
1646
+ "autoincrement": false,
1647
+ "default": 0
1648
+ },
1649
+ "next_attempt": {
1650
+ "name": "next_attempt",
1651
+ "type": "integer",
1652
+ "primaryKey": false,
1653
+ "notNull": true,
1654
+ "autoincrement": false
1655
+ },
1656
+ "lease_until": {
1657
+ "name": "lease_until",
1658
+ "type": "integer",
1659
+ "primaryKey": false,
1660
+ "notNull": false,
1661
+ "autoincrement": false
1662
+ },
1663
+ "sent_at": {
1664
+ "name": "sent_at",
1665
+ "type": "integer",
1666
+ "primaryKey": false,
1667
+ "notNull": false,
1668
+ "autoincrement": false
1669
+ },
1670
+ "last_error": {
1671
+ "name": "last_error",
1672
+ "type": "text",
1673
+ "primaryKey": false,
1674
+ "notNull": false,
1675
+ "autoincrement": false
1676
+ }
1677
+ },
1678
+ "indexes": {
1679
+ "mail_outbox_due_idx": {
1680
+ "name": "mail_outbox_due_idx",
1681
+ "columns": [
1682
+ "next_attempt"
1683
+ ],
1684
+ "isUnique": false,
1685
+ "where": "\"mail_outbox\".\"sent_at\" IS NULL"
1686
+ }
1687
+ },
1688
+ "foreignKeys": {},
1689
+ "compositePrimaryKeys": {},
1690
+ "uniqueConstraints": {},
1691
+ "checkConstraints": {}
1692
+ },
1693
+ "oauth_attempts": {
1694
+ "name": "oauth_attempts",
1695
+ "columns": {
1696
+ "state_digest": {
1697
+ "name": "state_digest",
1698
+ "type": "text",
1699
+ "primaryKey": true,
1700
+ "notNull": true,
1701
+ "autoincrement": false
1702
+ },
1703
+ "user_id": {
1704
+ "name": "user_id",
1705
+ "type": "integer",
1706
+ "primaryKey": false,
1707
+ "notNull": true,
1708
+ "autoincrement": false
1709
+ },
1710
+ "workspace_id": {
1711
+ "name": "workspace_id",
1712
+ "type": "integer",
1713
+ "primaryKey": false,
1714
+ "notNull": true,
1715
+ "autoincrement": false
1716
+ },
1717
+ "plugin_id": {
1718
+ "name": "plugin_id",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": true,
1722
+ "autoincrement": false
1723
+ },
1724
+ "session_id": {
1725
+ "name": "session_id",
1726
+ "type": "text",
1727
+ "primaryKey": false,
1728
+ "notNull": true,
1729
+ "autoincrement": false
1730
+ },
1731
+ "encrypted_payload": {
1732
+ "name": "encrypted_payload",
1733
+ "type": "text",
1734
+ "primaryKey": false,
1735
+ "notNull": true,
1736
+ "autoincrement": false
1737
+ },
1738
+ "expires_at": {
1739
+ "name": "expires_at",
1740
+ "type": "integer",
1741
+ "primaryKey": false,
1742
+ "notNull": true,
1743
+ "autoincrement": false
1744
+ }
1745
+ },
1746
+ "indexes": {},
1747
+ "foreignKeys": {
1748
+ "oauth_attempts_user_id_users_id_fk": {
1749
+ "name": "oauth_attempts_user_id_users_id_fk",
1750
+ "tableFrom": "oauth_attempts",
1751
+ "tableTo": "users",
1752
+ "columnsFrom": [
1753
+ "user_id"
1754
+ ],
1755
+ "columnsTo": [
1756
+ "id"
1757
+ ],
1758
+ "onDelete": "no action",
1759
+ "onUpdate": "no action"
1760
+ },
1761
+ "oauth_attempts_workspace_id_workspaces_id_fk": {
1762
+ "name": "oauth_attempts_workspace_id_workspaces_id_fk",
1763
+ "tableFrom": "oauth_attempts",
1764
+ "tableTo": "workspaces",
1765
+ "columnsFrom": [
1766
+ "workspace_id"
1767
+ ],
1768
+ "columnsTo": [
1769
+ "id"
1770
+ ],
1771
+ "onDelete": "no action",
1772
+ "onUpdate": "no action"
1773
+ },
1774
+ "oauth_attempts_plugin_id_plugins_id_fk": {
1775
+ "name": "oauth_attempts_plugin_id_plugins_id_fk",
1776
+ "tableFrom": "oauth_attempts",
1777
+ "tableTo": "plugins",
1778
+ "columnsFrom": [
1779
+ "plugin_id"
1780
+ ],
1781
+ "columnsTo": [
1782
+ "id"
1783
+ ],
1784
+ "onDelete": "cascade",
1785
+ "onUpdate": "no action"
1786
+ },
1787
+ "oauth_attempts_session_id_sessions_id_fk": {
1788
+ "name": "oauth_attempts_session_id_sessions_id_fk",
1789
+ "tableFrom": "oauth_attempts",
1790
+ "tableTo": "sessions",
1791
+ "columnsFrom": [
1792
+ "session_id"
1793
+ ],
1794
+ "columnsTo": [
1795
+ "id"
1796
+ ],
1797
+ "onDelete": "cascade",
1798
+ "onUpdate": "no action"
1799
+ }
1800
+ },
1801
+ "compositePrimaryKeys": {},
1802
+ "uniqueConstraints": {},
1803
+ "checkConstraints": {}
1804
+ },
1805
+ "credentials": {
1806
+ "name": "credentials",
1807
+ "columns": {
1808
+ "id": {
1809
+ "name": "id",
1810
+ "type": "text",
1811
+ "primaryKey": true,
1812
+ "notNull": true,
1813
+ "autoincrement": false
1814
+ },
1815
+ "workspace_id": {
1816
+ "name": "workspace_id",
1817
+ "type": "integer",
1818
+ "primaryKey": false,
1819
+ "notNull": true,
1820
+ "autoincrement": false
1821
+ },
1822
+ "name": {
1823
+ "name": "name",
1824
+ "type": "text",
1825
+ "primaryKey": false,
1826
+ "notNull": true,
1827
+ "autoincrement": false
1828
+ },
1829
+ "provider": {
1830
+ "name": "provider",
1831
+ "type": "text",
1832
+ "primaryKey": false,
1833
+ "notNull": true,
1834
+ "autoincrement": false
1835
+ },
1836
+ "encrypted_secret": {
1837
+ "name": "encrypted_secret",
1838
+ "type": "text",
1839
+ "primaryKey": false,
1840
+ "notNull": true,
1841
+ "autoincrement": false
1842
+ },
1843
+ "created_at": {
1844
+ "name": "created_at",
1845
+ "type": "text",
1846
+ "primaryKey": false,
1847
+ "notNull": true,
1848
+ "autoincrement": false
1849
+ },
1850
+ "updated_at": {
1851
+ "name": "updated_at",
1852
+ "type": "text",
1853
+ "primaryKey": false,
1854
+ "notNull": true,
1855
+ "autoincrement": false
1856
+ }
1857
+ },
1858
+ "indexes": {},
1859
+ "foreignKeys": {
1860
+ "credentials_workspace_id_workspaces_id_fk": {
1861
+ "name": "credentials_workspace_id_workspaces_id_fk",
1862
+ "tableFrom": "credentials",
1863
+ "tableTo": "workspaces",
1864
+ "columnsFrom": [
1865
+ "workspace_id"
1866
+ ],
1867
+ "columnsTo": [
1868
+ "id"
1869
+ ],
1870
+ "onDelete": "cascade",
1871
+ "onUpdate": "no action"
1872
+ }
1873
+ },
1874
+ "compositePrimaryKeys": {},
1875
+ "uniqueConstraints": {},
1876
+ "checkConstraints": {}
1877
+ },
1878
+ "plugins": {
1879
+ "name": "plugins",
1880
+ "columns": {
1881
+ "id": {
1882
+ "name": "id",
1883
+ "type": "text",
1884
+ "primaryKey": true,
1885
+ "notNull": true,
1886
+ "autoincrement": false
1887
+ },
1888
+ "workspace_id": {
1889
+ "name": "workspace_id",
1890
+ "type": "integer",
1891
+ "primaryKey": false,
1892
+ "notNull": true,
1893
+ "autoincrement": false
1894
+ },
1895
+ "project_id": {
1896
+ "name": "project_id",
1897
+ "type": "text",
1898
+ "primaryKey": false,
1899
+ "notNull": true,
1900
+ "autoincrement": false
1901
+ },
1902
+ "slug": {
1903
+ "name": "slug",
1904
+ "type": "text",
1905
+ "primaryKey": false,
1906
+ "notNull": true,
1907
+ "autoincrement": false
1908
+ },
1909
+ "version": {
1910
+ "name": "version",
1911
+ "type": "text",
1912
+ "primaryKey": false,
1913
+ "notNull": true,
1914
+ "autoincrement": false
1915
+ },
1916
+ "description": {
1917
+ "name": "description",
1918
+ "type": "text",
1919
+ "primaryKey": false,
1920
+ "notNull": true,
1921
+ "autoincrement": false,
1922
+ "default": "''"
1923
+ },
1924
+ "source": {
1925
+ "name": "source",
1926
+ "type": "text",
1927
+ "primaryKey": false,
1928
+ "notNull": true,
1929
+ "autoincrement": false,
1930
+ "default": "''"
1931
+ },
1932
+ "digest": {
1933
+ "name": "digest",
1934
+ "type": "text",
1935
+ "primaryKey": false,
1936
+ "notNull": true,
1937
+ "autoincrement": false
1938
+ },
1939
+ "enabled": {
1940
+ "name": "enabled",
1941
+ "type": "integer",
1942
+ "primaryKey": false,
1943
+ "notNull": true,
1944
+ "autoincrement": false,
1945
+ "default": "1"
1946
+ },
1947
+ "credential_id": {
1948
+ "name": "credential_id",
1949
+ "type": "text",
1950
+ "primaryKey": false,
1951
+ "notNull": false,
1952
+ "autoincrement": false
1953
+ },
1954
+ "configuration": {
1955
+ "name": "configuration",
1956
+ "type": "text",
1957
+ "primaryKey": false,
1958
+ "notNull": true,
1959
+ "autoincrement": false,
1960
+ "default": "'{}'"
1961
+ },
1962
+ "release_metadata": {
1963
+ "name": "release_metadata",
1964
+ "type": "text",
1965
+ "primaryKey": false,
1966
+ "notNull": true,
1967
+ "autoincrement": false,
1968
+ "default": "'{}'"
1969
+ },
1970
+ "package_url": {
1971
+ "name": "package_url",
1972
+ "type": "text",
1973
+ "primaryKey": false,
1974
+ "notNull": true,
1975
+ "autoincrement": false,
1976
+ "default": "''"
1977
+ },
1978
+ "distribution": {
1979
+ "name": "distribution",
1980
+ "type": "text",
1981
+ "primaryKey": false,
1982
+ "notNull": true,
1983
+ "autoincrement": false,
1984
+ "default": "'inline'"
1985
+ },
1986
+ "created_at": {
1987
+ "name": "created_at",
1988
+ "type": "text",
1989
+ "primaryKey": false,
1990
+ "notNull": true,
1991
+ "autoincrement": false
1992
+ },
1993
+ "updated_at": {
1994
+ "name": "updated_at",
1995
+ "type": "text",
1996
+ "primaryKey": false,
1997
+ "notNull": true,
1998
+ "autoincrement": false
1999
+ }
2000
+ },
2001
+ "indexes": {
2002
+ "plugins_project_id_slug_unique": {
2003
+ "name": "plugins_project_id_slug_unique",
2004
+ "columns": [
2005
+ "project_id",
2006
+ "slug"
2007
+ ],
2008
+ "isUnique": true
2009
+ }
2010
+ },
2011
+ "foreignKeys": {
2012
+ "plugins_workspace_id_workspaces_id_fk": {
2013
+ "name": "plugins_workspace_id_workspaces_id_fk",
2014
+ "tableFrom": "plugins",
2015
+ "tableTo": "workspaces",
2016
+ "columnsFrom": [
2017
+ "workspace_id"
2018
+ ],
2019
+ "columnsTo": [
2020
+ "id"
2021
+ ],
2022
+ "onDelete": "cascade",
2023
+ "onUpdate": "no action"
2024
+ },
2025
+ "plugins_project_id_projects_id_fk": {
2026
+ "name": "plugins_project_id_projects_id_fk",
2027
+ "tableFrom": "plugins",
2028
+ "tableTo": "projects",
2029
+ "columnsFrom": [
2030
+ "project_id"
2031
+ ],
2032
+ "columnsTo": [
2033
+ "id"
2034
+ ],
2035
+ "onDelete": "cascade",
2036
+ "onUpdate": "no action"
2037
+ },
2038
+ "plugins_credential_id_credentials_id_fk": {
2039
+ "name": "plugins_credential_id_credentials_id_fk",
2040
+ "tableFrom": "plugins",
2041
+ "tableTo": "credentials",
2042
+ "columnsFrom": [
2043
+ "credential_id"
2044
+ ],
2045
+ "columnsTo": [
2046
+ "id"
2047
+ ],
2048
+ "onDelete": "set null",
2049
+ "onUpdate": "no action"
2050
+ }
2051
+ },
2052
+ "compositePrimaryKeys": {},
2053
+ "uniqueConstraints": {},
2054
+ "checkConstraints": {}
2055
+ },
2056
+ "shell_rules": {
2057
+ "name": "shell_rules",
2058
+ "columns": {
2059
+ "plugin_id": {
2060
+ "name": "plugin_id",
2061
+ "type": "text",
2062
+ "primaryKey": false,
2063
+ "notNull": true,
2064
+ "autoincrement": false
2065
+ },
2066
+ "executable": {
2067
+ "name": "executable",
2068
+ "type": "text",
2069
+ "primaryKey": false,
2070
+ "notNull": true,
2071
+ "autoincrement": false
2072
+ },
2073
+ "decision": {
2074
+ "name": "decision",
2075
+ "type": "text",
2076
+ "primaryKey": false,
2077
+ "notNull": true,
2078
+ "autoincrement": false
2079
+ }
2080
+ },
2081
+ "indexes": {},
2082
+ "foreignKeys": {
2083
+ "shell_rules_plugin_id_plugins_id_fk": {
2084
+ "name": "shell_rules_plugin_id_plugins_id_fk",
2085
+ "tableFrom": "shell_rules",
2086
+ "tableTo": "plugins",
2087
+ "columnsFrom": [
2088
+ "plugin_id"
2089
+ ],
2090
+ "columnsTo": [
2091
+ "id"
2092
+ ],
2093
+ "onDelete": "cascade",
2094
+ "onUpdate": "no action"
2095
+ }
2096
+ },
2097
+ "compositePrimaryKeys": {
2098
+ "shell_rules_plugin_id_executable_pk": {
2099
+ "columns": [
2100
+ "plugin_id",
2101
+ "executable"
2102
+ ],
2103
+ "name": "shell_rules_plugin_id_executable_pk"
2104
+ }
2105
+ },
2106
+ "uniqueConstraints": {},
2107
+ "checkConstraints": {}
2108
+ },
2109
+ "executors": {
2110
+ "name": "executors",
2111
+ "columns": {
2112
+ "id": {
2113
+ "name": "id",
2114
+ "type": "text",
2115
+ "primaryKey": true,
2116
+ "notNull": true,
2117
+ "autoincrement": false
2118
+ },
2119
+ "workspace_id": {
2120
+ "name": "workspace_id",
2121
+ "type": "integer",
2122
+ "primaryKey": false,
2123
+ "notNull": true,
2124
+ "autoincrement": false
2125
+ },
2126
+ "project_id": {
2127
+ "name": "project_id",
2128
+ "type": "text",
2129
+ "primaryKey": false,
2130
+ "notNull": true,
2131
+ "autoincrement": false
2132
+ },
2133
+ "name": {
2134
+ "name": "name",
2135
+ "type": "text",
2136
+ "primaryKey": false,
2137
+ "notNull": true,
2138
+ "autoincrement": false
2139
+ },
2140
+ "pool": {
2141
+ "name": "pool",
2142
+ "type": "text",
2143
+ "primaryKey": false,
2144
+ "notNull": true,
2145
+ "autoincrement": false,
2146
+ "default": "'shared'"
2147
+ },
2148
+ "token_hash": {
2149
+ "name": "token_hash",
2150
+ "type": "text",
2151
+ "primaryKey": false,
2152
+ "notNull": true,
2153
+ "autoincrement": false
2154
+ },
2155
+ "registration_nonce": {
2156
+ "name": "registration_nonce",
2157
+ "type": "text",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "autoincrement": false
2161
+ },
2162
+ "locally_managed": {
2163
+ "name": "locally_managed",
2164
+ "type": "integer",
2165
+ "primaryKey": false,
2166
+ "notNull": true,
2167
+ "autoincrement": false,
2168
+ "default": "0"
2169
+ },
2170
+ "enabled": {
2171
+ "name": "enabled",
2172
+ "type": "integer",
2173
+ "primaryKey": false,
2174
+ "notNull": true,
2175
+ "autoincrement": false,
2176
+ "default": "1"
2177
+ },
2178
+ "protocol_version": {
2179
+ "name": "protocol_version",
2180
+ "type": "integer",
2181
+ "primaryKey": false,
2182
+ "notNull": true,
2183
+ "autoincrement": false,
2184
+ "default": "1"
2185
+ },
2186
+ "capabilities": {
2187
+ "name": "capabilities",
2188
+ "type": "text",
2189
+ "primaryKey": false,
2190
+ "notNull": true,
2191
+ "autoincrement": false,
2192
+ "default": "'[]'"
2193
+ },
2194
+ "last_seen_at": {
2195
+ "name": "last_seen_at",
2196
+ "type": "text",
2197
+ "primaryKey": false,
2198
+ "notNull": false,
2199
+ "autoincrement": false
2200
+ },
2201
+ "created_at": {
2202
+ "name": "created_at",
2203
+ "type": "text",
2204
+ "primaryKey": false,
2205
+ "notNull": true,
2206
+ "autoincrement": false
2207
+ },
2208
+ "updated_at": {
2209
+ "name": "updated_at",
2210
+ "type": "text",
2211
+ "primaryKey": false,
2212
+ "notNull": true,
2213
+ "autoincrement": false
2214
+ }
2215
+ },
2216
+ "indexes": {
2217
+ "executors_token_hash_unique": {
2218
+ "name": "executors_token_hash_unique",
2219
+ "columns": [
2220
+ "token_hash"
2221
+ ],
2222
+ "isUnique": true
2223
+ },
2224
+ "executors_name_unique": {
2225
+ "name": "executors_name_unique",
2226
+ "columns": [
2227
+ "name"
2228
+ ],
2229
+ "isUnique": true
2230
+ },
2231
+ "executors_project_id_unique": {
2232
+ "name": "executors_project_id_unique",
2233
+ "columns": [
2234
+ "project_id"
2235
+ ],
2236
+ "isUnique": true
2237
+ }
2238
+ },
2239
+ "foreignKeys": {
2240
+ "executors_workspace_id_workspaces_id_fk": {
2241
+ "name": "executors_workspace_id_workspaces_id_fk",
2242
+ "tableFrom": "executors",
2243
+ "tableTo": "workspaces",
2244
+ "columnsFrom": [
2245
+ "workspace_id"
2246
+ ],
2247
+ "columnsTo": [
2248
+ "id"
2249
+ ],
2250
+ "onDelete": "cascade",
2251
+ "onUpdate": "no action"
2252
+ },
2253
+ "executors_project_id_projects_id_fk": {
2254
+ "name": "executors_project_id_projects_id_fk",
2255
+ "tableFrom": "executors",
2256
+ "tableTo": "projects",
2257
+ "columnsFrom": [
2258
+ "project_id"
2259
+ ],
2260
+ "columnsTo": [
2261
+ "id"
2262
+ ],
2263
+ "onDelete": "cascade",
2264
+ "onUpdate": "no action"
2265
+ }
2266
+ },
2267
+ "compositePrimaryKeys": {},
2268
+ "uniqueConstraints": {},
2269
+ "checkConstraints": {}
2270
+ },
2271
+ "projects": {
2272
+ "name": "projects",
2273
+ "columns": {
2274
+ "id": {
2275
+ "name": "id",
2276
+ "type": "text",
2277
+ "primaryKey": true,
2278
+ "notNull": true,
2279
+ "autoincrement": false
2280
+ },
2281
+ "workspace_id": {
2282
+ "name": "workspace_id",
2283
+ "type": "integer",
2284
+ "primaryKey": false,
2285
+ "notNull": true,
2286
+ "autoincrement": false
2287
+ },
2288
+ "name": {
2289
+ "name": "name",
2290
+ "type": "text",
2291
+ "primaryKey": false,
2292
+ "notNull": true,
2293
+ "autoincrement": false
2294
+ },
2295
+ "enabled": {
2296
+ "name": "enabled",
2297
+ "type": "integer",
2298
+ "primaryKey": false,
2299
+ "notNull": true,
2300
+ "autoincrement": false,
2301
+ "default": "1"
2302
+ },
2303
+ "readable_tables": {
2304
+ "name": "readable_tables",
2305
+ "type": "text",
2306
+ "primaryKey": false,
2307
+ "notNull": true,
2308
+ "autoincrement": false,
2309
+ "default": "'[]'"
2310
+ },
2311
+ "writable_tables": {
2312
+ "name": "writable_tables",
2313
+ "type": "text",
2314
+ "primaryKey": false,
2315
+ "notNull": true,
2316
+ "autoincrement": false,
2317
+ "default": "'[]'"
2318
+ },
2319
+ "readable_documents": {
2320
+ "name": "readable_documents",
2321
+ "type": "text",
2322
+ "primaryKey": false,
2323
+ "notNull": true,
2324
+ "autoincrement": false,
2325
+ "default": "'[]'"
2326
+ },
2327
+ "writable_documents": {
2328
+ "name": "writable_documents",
2329
+ "type": "text",
2330
+ "primaryKey": false,
2331
+ "notNull": true,
2332
+ "autoincrement": false,
2333
+ "default": "'[]'"
2334
+ },
2335
+ "created_at": {
2336
+ "name": "created_at",
2337
+ "type": "text",
2338
+ "primaryKey": false,
2339
+ "notNull": true,
2340
+ "autoincrement": false
2341
+ },
2342
+ "updated_at": {
2343
+ "name": "updated_at",
2344
+ "type": "text",
2345
+ "primaryKey": false,
2346
+ "notNull": true,
2347
+ "autoincrement": false
2348
+ }
2349
+ },
2350
+ "indexes": {},
2351
+ "foreignKeys": {
2352
+ "projects_workspace_id_workspaces_id_fk": {
2353
+ "name": "projects_workspace_id_workspaces_id_fk",
2354
+ "tableFrom": "projects",
2355
+ "tableTo": "workspaces",
2356
+ "columnsFrom": [
2357
+ "workspace_id"
2358
+ ],
2359
+ "columnsTo": [
2360
+ "id"
2361
+ ],
2362
+ "onDelete": "cascade",
2363
+ "onUpdate": "no action"
2364
+ }
2365
+ },
2366
+ "compositePrimaryKeys": {},
2367
+ "uniqueConstraints": {},
2368
+ "checkConstraints": {}
2369
+ },
2370
+ "workspace_settings": {
2371
+ "name": "workspace_settings",
2372
+ "columns": {
2373
+ "id": {
2374
+ "name": "id",
2375
+ "type": "text",
2376
+ "primaryKey": true,
2377
+ "notNull": true,
2378
+ "autoincrement": false
2379
+ },
2380
+ "workspace_id": {
2381
+ "name": "workspace_id",
2382
+ "type": "integer",
2383
+ "primaryKey": false,
2384
+ "notNull": true,
2385
+ "autoincrement": false
2386
+ },
2387
+ "execution_pool": {
2388
+ "name": "execution_pool",
2389
+ "type": "text",
2390
+ "primaryKey": false,
2391
+ "notNull": true,
2392
+ "autoincrement": false,
2393
+ "default": "'shared'"
2394
+ },
2395
+ "enabled": {
2396
+ "name": "enabled",
2397
+ "type": "integer",
2398
+ "primaryKey": false,
2399
+ "notNull": true,
2400
+ "autoincrement": false,
2401
+ "default": "1"
2402
+ },
2403
+ "max_concurrent_runs": {
2404
+ "name": "max_concurrent_runs",
2405
+ "type": "integer",
2406
+ "primaryKey": false,
2407
+ "notNull": true,
2408
+ "autoincrement": false,
2409
+ "default": "4"
2410
+ },
2411
+ "created_at": {
2412
+ "name": "created_at",
2413
+ "type": "text",
2414
+ "primaryKey": false,
2415
+ "notNull": true,
2416
+ "autoincrement": false
2417
+ },
2418
+ "updated_at": {
2419
+ "name": "updated_at",
2420
+ "type": "text",
2421
+ "primaryKey": false,
2422
+ "notNull": true,
2423
+ "autoincrement": false
2424
+ }
2425
+ },
2426
+ "indexes": {
2427
+ "workspace_settings_workspace_id_unique": {
2428
+ "name": "workspace_settings_workspace_id_unique",
2429
+ "columns": [
2430
+ "workspace_id"
2431
+ ],
2432
+ "isUnique": true
2433
+ }
2434
+ },
2435
+ "foreignKeys": {
2436
+ "workspace_settings_workspace_id_workspaces_id_fk": {
2437
+ "name": "workspace_settings_workspace_id_workspaces_id_fk",
2438
+ "tableFrom": "workspace_settings",
2439
+ "tableTo": "workspaces",
2440
+ "columnsFrom": [
2441
+ "workspace_id"
2442
+ ],
2443
+ "columnsTo": [
2444
+ "id"
2445
+ ],
2446
+ "onDelete": "cascade",
2447
+ "onUpdate": "no action"
2448
+ }
2449
+ },
2450
+ "compositePrimaryKeys": {},
2451
+ "uniqueConstraints": {},
2452
+ "checkConstraints": {}
2453
+ },
2454
+ "approvals": {
2455
+ "name": "approvals",
2456
+ "columns": {
2457
+ "id": {
2458
+ "name": "id",
2459
+ "type": "text",
2460
+ "primaryKey": true,
2461
+ "notNull": true,
2462
+ "autoincrement": false
2463
+ },
2464
+ "workspace_id": {
2465
+ "name": "workspace_id",
2466
+ "type": "integer",
2467
+ "primaryKey": false,
2468
+ "notNull": true,
2469
+ "autoincrement": false
2470
+ },
2471
+ "run_id": {
2472
+ "name": "run_id",
2473
+ "type": "text",
2474
+ "primaryKey": false,
2475
+ "notNull": true,
2476
+ "autoincrement": false
2477
+ },
2478
+ "prompt": {
2479
+ "name": "prompt",
2480
+ "type": "text",
2481
+ "primaryKey": false,
2482
+ "notNull": true,
2483
+ "autoincrement": false
2484
+ },
2485
+ "shell": {
2486
+ "name": "shell",
2487
+ "type": "text",
2488
+ "primaryKey": false,
2489
+ "notNull": false,
2490
+ "autoincrement": false
2491
+ },
2492
+ "status": {
2493
+ "name": "status",
2494
+ "type": "text",
2495
+ "primaryKey": false,
2496
+ "notNull": true,
2497
+ "autoincrement": false,
2498
+ "default": "'pending'"
2499
+ },
2500
+ "decided_by": {
2501
+ "name": "decided_by",
2502
+ "type": "integer",
2503
+ "primaryKey": false,
2504
+ "notNull": false,
2505
+ "autoincrement": false
2506
+ },
2507
+ "created_at": {
2508
+ "name": "created_at",
2509
+ "type": "text",
2510
+ "primaryKey": false,
2511
+ "notNull": true,
2512
+ "autoincrement": false
2513
+ },
2514
+ "updated_at": {
2515
+ "name": "updated_at",
2516
+ "type": "text",
2517
+ "primaryKey": false,
2518
+ "notNull": true,
2519
+ "autoincrement": false
2520
+ }
2521
+ },
2522
+ "indexes": {},
2523
+ "foreignKeys": {
2524
+ "approvals_workspace_id_workspaces_id_fk": {
2525
+ "name": "approvals_workspace_id_workspaces_id_fk",
2526
+ "tableFrom": "approvals",
2527
+ "tableTo": "workspaces",
2528
+ "columnsFrom": [
2529
+ "workspace_id"
2530
+ ],
2531
+ "columnsTo": [
2532
+ "id"
2533
+ ],
2534
+ "onDelete": "cascade",
2535
+ "onUpdate": "no action"
2536
+ },
2537
+ "approvals_run_id_runs_id_fk": {
2538
+ "name": "approvals_run_id_runs_id_fk",
2539
+ "tableFrom": "approvals",
2540
+ "tableTo": "runs",
2541
+ "columnsFrom": [
2542
+ "run_id"
2543
+ ],
2544
+ "columnsTo": [
2545
+ "id"
2546
+ ],
2547
+ "onDelete": "cascade",
2548
+ "onUpdate": "no action"
2549
+ },
2550
+ "approvals_decided_by_users_id_fk": {
2551
+ "name": "approvals_decided_by_users_id_fk",
2552
+ "tableFrom": "approvals",
2553
+ "tableTo": "users",
2554
+ "columnsFrom": [
2555
+ "decided_by"
2556
+ ],
2557
+ "columnsTo": [
2558
+ "id"
2559
+ ],
2560
+ "onDelete": "restrict",
2561
+ "onUpdate": "no action"
2562
+ }
2563
+ },
2564
+ "compositePrimaryKeys": {},
2565
+ "uniqueConstraints": {},
2566
+ "checkConstraints": {}
2567
+ },
2568
+ "artifacts": {
2569
+ "name": "artifacts",
2570
+ "columns": {
2571
+ "id": {
2572
+ "name": "id",
2573
+ "type": "text",
2574
+ "primaryKey": true,
2575
+ "notNull": true,
2576
+ "autoincrement": false
2577
+ },
2578
+ "workspace_id": {
2579
+ "name": "workspace_id",
2580
+ "type": "integer",
2581
+ "primaryKey": false,
2582
+ "notNull": true,
2583
+ "autoincrement": false
2584
+ },
2585
+ "run_id": {
2586
+ "name": "run_id",
2587
+ "type": "text",
2588
+ "primaryKey": false,
2589
+ "notNull": true,
2590
+ "autoincrement": false
2591
+ },
2592
+ "name": {
2593
+ "name": "name",
2594
+ "type": "text",
2595
+ "primaryKey": false,
2596
+ "notNull": true,
2597
+ "autoincrement": false
2598
+ },
2599
+ "content": {
2600
+ "name": "content",
2601
+ "type": "text",
2602
+ "primaryKey": false,
2603
+ "notNull": true,
2604
+ "autoincrement": false
2605
+ },
2606
+ "media_type": {
2607
+ "name": "media_type",
2608
+ "type": "text",
2609
+ "primaryKey": false,
2610
+ "notNull": true,
2611
+ "autoincrement": false,
2612
+ "default": "'text/plain'"
2613
+ },
2614
+ "created_at": {
2615
+ "name": "created_at",
2616
+ "type": "text",
2617
+ "primaryKey": false,
2618
+ "notNull": true,
2619
+ "autoincrement": false
2620
+ },
2621
+ "updated_at": {
2622
+ "name": "updated_at",
2623
+ "type": "text",
2624
+ "primaryKey": false,
2625
+ "notNull": true,
2626
+ "autoincrement": false
2627
+ }
2628
+ },
2629
+ "indexes": {},
2630
+ "foreignKeys": {
2631
+ "artifacts_workspace_id_workspaces_id_fk": {
2632
+ "name": "artifacts_workspace_id_workspaces_id_fk",
2633
+ "tableFrom": "artifacts",
2634
+ "tableTo": "workspaces",
2635
+ "columnsFrom": [
2636
+ "workspace_id"
2637
+ ],
2638
+ "columnsTo": [
2639
+ "id"
2640
+ ],
2641
+ "onDelete": "cascade",
2642
+ "onUpdate": "no action"
2643
+ },
2644
+ "artifacts_run_id_runs_id_fk": {
2645
+ "name": "artifacts_run_id_runs_id_fk",
2646
+ "tableFrom": "artifacts",
2647
+ "tableTo": "runs",
2648
+ "columnsFrom": [
2649
+ "run_id"
2650
+ ],
2651
+ "columnsTo": [
2652
+ "id"
2653
+ ],
2654
+ "onDelete": "cascade",
2655
+ "onUpdate": "no action"
2656
+ }
2657
+ },
2658
+ "compositePrimaryKeys": {},
2659
+ "uniqueConstraints": {},
2660
+ "checkConstraints": {}
2661
+ },
2662
+ "run_events": {
2663
+ "name": "run_events",
2664
+ "columns": {
2665
+ "id": {
2666
+ "name": "id",
2667
+ "type": "text",
2668
+ "primaryKey": true,
2669
+ "notNull": true,
2670
+ "autoincrement": false
2671
+ },
2672
+ "workspace_id": {
2673
+ "name": "workspace_id",
2674
+ "type": "integer",
2675
+ "primaryKey": false,
2676
+ "notNull": true,
2677
+ "autoincrement": false
2678
+ },
2679
+ "run_id": {
2680
+ "name": "run_id",
2681
+ "type": "text",
2682
+ "primaryKey": false,
2683
+ "notNull": true,
2684
+ "autoincrement": false
2685
+ },
2686
+ "sequence": {
2687
+ "name": "sequence",
2688
+ "type": "integer",
2689
+ "primaryKey": false,
2690
+ "notNull": true,
2691
+ "autoincrement": false
2692
+ },
2693
+ "kind": {
2694
+ "name": "kind",
2695
+ "type": "text",
2696
+ "primaryKey": false,
2697
+ "notNull": true,
2698
+ "autoincrement": false
2699
+ },
2700
+ "data": {
2701
+ "name": "data",
2702
+ "type": "text",
2703
+ "primaryKey": false,
2704
+ "notNull": true,
2705
+ "autoincrement": false,
2706
+ "default": "'{}'"
2707
+ },
2708
+ "created_at": {
2709
+ "name": "created_at",
2710
+ "type": "text",
2711
+ "primaryKey": false,
2712
+ "notNull": true,
2713
+ "autoincrement": false
2714
+ },
2715
+ "updated_at": {
2716
+ "name": "updated_at",
2717
+ "type": "text",
2718
+ "primaryKey": false,
2719
+ "notNull": true,
2720
+ "autoincrement": false
2721
+ }
2722
+ },
2723
+ "indexes": {
2724
+ "run_events_run_id_sequence_unique": {
2725
+ "name": "run_events_run_id_sequence_unique",
2726
+ "columns": [
2727
+ "run_id",
2728
+ "sequence"
2729
+ ],
2730
+ "isUnique": true
2731
+ }
2732
+ },
2733
+ "foreignKeys": {
2734
+ "run_events_workspace_id_workspaces_id_fk": {
2735
+ "name": "run_events_workspace_id_workspaces_id_fk",
2736
+ "tableFrom": "run_events",
2737
+ "tableTo": "workspaces",
2738
+ "columnsFrom": [
2739
+ "workspace_id"
2740
+ ],
2741
+ "columnsTo": [
2742
+ "id"
2743
+ ],
2744
+ "onDelete": "cascade",
2745
+ "onUpdate": "no action"
2746
+ },
2747
+ "run_events_run_id_runs_id_fk": {
2748
+ "name": "run_events_run_id_runs_id_fk",
2749
+ "tableFrom": "run_events",
2750
+ "tableTo": "runs",
2751
+ "columnsFrom": [
2752
+ "run_id"
2753
+ ],
2754
+ "columnsTo": [
2755
+ "id"
2756
+ ],
2757
+ "onDelete": "cascade",
2758
+ "onUpdate": "no action"
2759
+ }
2760
+ },
2761
+ "compositePrimaryKeys": {},
2762
+ "uniqueConstraints": {},
2763
+ "checkConstraints": {}
2764
+ },
2765
+ "runs": {
2766
+ "name": "runs",
2767
+ "columns": {
2768
+ "id": {
2769
+ "name": "id",
2770
+ "type": "text",
2771
+ "primaryKey": true,
2772
+ "notNull": true,
2773
+ "autoincrement": false
2774
+ },
2775
+ "workspace_id": {
2776
+ "name": "workspace_id",
2777
+ "type": "integer",
2778
+ "primaryKey": false,
2779
+ "notNull": true,
2780
+ "autoincrement": false
2781
+ },
2782
+ "project_id": {
2783
+ "name": "project_id",
2784
+ "type": "text",
2785
+ "primaryKey": false,
2786
+ "notNull": true,
2787
+ "autoincrement": false
2788
+ },
2789
+ "actor_id": {
2790
+ "name": "actor_id",
2791
+ "type": "integer",
2792
+ "primaryKey": false,
2793
+ "notNull": true,
2794
+ "autoincrement": false
2795
+ },
2796
+ "token_id": {
2797
+ "name": "token_id",
2798
+ "type": "text",
2799
+ "primaryKey": false,
2800
+ "notNull": false,
2801
+ "autoincrement": false
2802
+ },
2803
+ "action_version_id": {
2804
+ "name": "action_version_id",
2805
+ "type": "text",
2806
+ "primaryKey": false,
2807
+ "notNull": false,
2808
+ "autoincrement": false
2809
+ },
2810
+ "operation": {
2811
+ "name": "operation",
2812
+ "type": "text",
2813
+ "primaryKey": false,
2814
+ "notNull": true,
2815
+ "autoincrement": false
2816
+ },
2817
+ "origin": {
2818
+ "name": "origin",
2819
+ "type": "text",
2820
+ "primaryKey": false,
2821
+ "notNull": true,
2822
+ "autoincrement": false,
2823
+ "default": "'browser'"
2824
+ },
2825
+ "origin_reference": {
2826
+ "name": "origin_reference",
2827
+ "type": "text",
2828
+ "primaryKey": false,
2829
+ "notNull": true,
2830
+ "autoincrement": false,
2831
+ "default": "''"
2832
+ },
2833
+ "inputs": {
2834
+ "name": "inputs",
2835
+ "type": "text",
2836
+ "primaryKey": false,
2837
+ "notNull": true,
2838
+ "autoincrement": false,
2839
+ "default": "'{}'"
2840
+ },
2841
+ "snapshot": {
2842
+ "name": "snapshot",
2843
+ "type": "text",
2844
+ "primaryKey": false,
2845
+ "notNull": true,
2846
+ "autoincrement": false,
2847
+ "default": "'{}'"
2848
+ },
2849
+ "status": {
2850
+ "name": "status",
2851
+ "type": "text",
2852
+ "primaryKey": false,
2853
+ "notNull": true,
2854
+ "autoincrement": false,
2855
+ "default": "'queued'"
2856
+ },
2857
+ "output": {
2858
+ "name": "output",
2859
+ "type": "text",
2860
+ "primaryKey": false,
2861
+ "notNull": true,
2862
+ "autoincrement": false,
2863
+ "default": "'{}'"
2864
+ },
2865
+ "error": {
2866
+ "name": "error",
2867
+ "type": "text",
2868
+ "primaryKey": false,
2869
+ "notNull": true,
2870
+ "autoincrement": false,
2871
+ "default": "''"
2872
+ },
2873
+ "idempotency_key": {
2874
+ "name": "idempotency_key",
2875
+ "type": "text",
2876
+ "primaryKey": false,
2877
+ "notNull": true,
2878
+ "autoincrement": false
2879
+ },
2880
+ "idempotency_namespace": {
2881
+ "name": "idempotency_namespace",
2882
+ "type": "text",
2883
+ "primaryKey": false,
2884
+ "notNull": true,
2885
+ "autoincrement": false,
2886
+ "default": "''"
2887
+ },
2888
+ "retry_of": {
2889
+ "name": "retry_of",
2890
+ "type": "text",
2891
+ "primaryKey": false,
2892
+ "notNull": false,
2893
+ "autoincrement": false
2894
+ },
2895
+ "cancel_requested": {
2896
+ "name": "cancel_requested",
2897
+ "type": "integer",
2898
+ "primaryKey": false,
2899
+ "notNull": true,
2900
+ "autoincrement": false,
2901
+ "default": "0"
2902
+ },
2903
+ "executor_id": {
2904
+ "name": "executor_id",
2905
+ "type": "text",
2906
+ "primaryKey": false,
2907
+ "notNull": false,
2908
+ "autoincrement": false
2909
+ },
2910
+ "lease_expires_at": {
2911
+ "name": "lease_expires_at",
2912
+ "type": "text",
2913
+ "primaryKey": false,
2914
+ "notNull": false,
2915
+ "autoincrement": false
2916
+ },
2917
+ "deadline": {
2918
+ "name": "deadline",
2919
+ "type": "text",
2920
+ "primaryKey": false,
2921
+ "notNull": false,
2922
+ "autoincrement": false
2923
+ },
2924
+ "capability_hash": {
2925
+ "name": "capability_hash",
2926
+ "type": "text",
2927
+ "primaryKey": false,
2928
+ "notNull": true,
2929
+ "autoincrement": false,
2930
+ "default": "''"
2931
+ },
2932
+ "created_at": {
2933
+ "name": "created_at",
2934
+ "type": "text",
2935
+ "primaryKey": false,
2936
+ "notNull": true,
2937
+ "autoincrement": false
2938
+ },
2939
+ "updated_at": {
2940
+ "name": "updated_at",
2941
+ "type": "text",
2942
+ "primaryKey": false,
2943
+ "notNull": true,
2944
+ "autoincrement": false
2945
+ }
2946
+ },
2947
+ "indexes": {
2948
+ "runs_queue_idx": {
2949
+ "name": "runs_queue_idx",
2950
+ "columns": [
2951
+ "workspace_id",
2952
+ "project_id",
2953
+ "status",
2954
+ "created_at"
2955
+ ],
2956
+ "isUnique": false
2957
+ },
2958
+ "runs_active_idx": {
2959
+ "name": "runs_active_idx",
2960
+ "columns": [
2961
+ "workspace_id",
2962
+ "status"
2963
+ ],
2964
+ "isUnique": false
2965
+ },
2966
+ "runs_workspace_id_idempotency_namespace_idempotency_key_unique": {
2967
+ "name": "runs_workspace_id_idempotency_namespace_idempotency_key_unique",
2968
+ "columns": [
2969
+ "workspace_id",
2970
+ "idempotency_namespace",
2971
+ "idempotency_key"
2972
+ ],
2973
+ "isUnique": true
2974
+ }
2975
+ },
2976
+ "foreignKeys": {
2977
+ "runs_workspace_id_workspaces_id_fk": {
2978
+ "name": "runs_workspace_id_workspaces_id_fk",
2979
+ "tableFrom": "runs",
2980
+ "tableTo": "workspaces",
2981
+ "columnsFrom": [
2982
+ "workspace_id"
2983
+ ],
2984
+ "columnsTo": [
2985
+ "id"
2986
+ ],
2987
+ "onDelete": "cascade",
2988
+ "onUpdate": "no action"
2989
+ },
2990
+ "runs_project_id_projects_id_fk": {
2991
+ "name": "runs_project_id_projects_id_fk",
2992
+ "tableFrom": "runs",
2993
+ "tableTo": "projects",
2994
+ "columnsFrom": [
2995
+ "project_id"
2996
+ ],
2997
+ "columnsTo": [
2998
+ "id"
2999
+ ],
3000
+ "onDelete": "restrict",
3001
+ "onUpdate": "no action"
3002
+ },
3003
+ "runs_actor_id_users_id_fk": {
3004
+ "name": "runs_actor_id_users_id_fk",
3005
+ "tableFrom": "runs",
3006
+ "tableTo": "users",
3007
+ "columnsFrom": [
3008
+ "actor_id"
3009
+ ],
3010
+ "columnsTo": [
3011
+ "id"
3012
+ ],
3013
+ "onDelete": "restrict",
3014
+ "onUpdate": "no action"
3015
+ },
3016
+ "runs_token_id_access_tokens_id_fk": {
3017
+ "name": "runs_token_id_access_tokens_id_fk",
3018
+ "tableFrom": "runs",
3019
+ "tableTo": "access_tokens",
3020
+ "columnsFrom": [
3021
+ "token_id"
3022
+ ],
3023
+ "columnsTo": [
3024
+ "id"
3025
+ ],
3026
+ "onDelete": "restrict",
3027
+ "onUpdate": "no action"
3028
+ },
3029
+ "runs_action_version_id_action_versions_id_fk": {
3030
+ "name": "runs_action_version_id_action_versions_id_fk",
3031
+ "tableFrom": "runs",
3032
+ "tableTo": "action_versions",
3033
+ "columnsFrom": [
3034
+ "action_version_id"
3035
+ ],
3036
+ "columnsTo": [
3037
+ "id"
3038
+ ],
3039
+ "onDelete": "restrict",
3040
+ "onUpdate": "no action"
3041
+ },
3042
+ "runs_retry_of_runs_id_fk": {
3043
+ "name": "runs_retry_of_runs_id_fk",
3044
+ "tableFrom": "runs",
3045
+ "tableTo": "runs",
3046
+ "columnsFrom": [
3047
+ "retry_of"
3048
+ ],
3049
+ "columnsTo": [
3050
+ "id"
3051
+ ],
3052
+ "onDelete": "set null",
3053
+ "onUpdate": "no action"
3054
+ },
3055
+ "runs_executor_id_executors_id_fk": {
3056
+ "name": "runs_executor_id_executors_id_fk",
3057
+ "tableFrom": "runs",
3058
+ "tableTo": "executors",
3059
+ "columnsFrom": [
3060
+ "executor_id"
3061
+ ],
3062
+ "columnsTo": [
3063
+ "id"
3064
+ ],
3065
+ "onDelete": "set null",
3066
+ "onUpdate": "no action"
3067
+ }
3068
+ },
3069
+ "compositePrimaryKeys": {},
3070
+ "uniqueConstraints": {},
3071
+ "checkConstraints": {
3072
+ "runs_status_check": {
3073
+ "name": "runs_status_check",
3074
+ "value": "\"runs\".\"status\" in ('queued','running','waiting_approval','succeeded','failed','cancelled','interrupted')"
3075
+ }
3076
+ }
3077
+ },
3078
+ "access_tokens": {
3079
+ "name": "access_tokens",
3080
+ "columns": {
3081
+ "id": {
3082
+ "name": "id",
3083
+ "type": "text",
3084
+ "primaryKey": true,
3085
+ "notNull": true,
3086
+ "autoincrement": false
3087
+ },
3088
+ "workspace_id": {
3089
+ "name": "workspace_id",
3090
+ "type": "integer",
3091
+ "primaryKey": false,
3092
+ "notNull": true,
3093
+ "autoincrement": false
3094
+ },
3095
+ "actor_id": {
3096
+ "name": "actor_id",
3097
+ "type": "integer",
3098
+ "primaryKey": false,
3099
+ "notNull": true,
3100
+ "autoincrement": false
3101
+ },
3102
+ "name": {
3103
+ "name": "name",
3104
+ "type": "text",
3105
+ "primaryKey": false,
3106
+ "notNull": true,
3107
+ "autoincrement": false
3108
+ },
3109
+ "digest": {
3110
+ "name": "digest",
3111
+ "type": "text",
3112
+ "primaryKey": false,
3113
+ "notNull": true,
3114
+ "autoincrement": false
3115
+ },
3116
+ "scopes": {
3117
+ "name": "scopes",
3118
+ "type": "text",
3119
+ "primaryKey": false,
3120
+ "notNull": true,
3121
+ "autoincrement": false
3122
+ },
3123
+ "projects": {
3124
+ "name": "projects",
3125
+ "type": "text",
3126
+ "primaryKey": false,
3127
+ "notNull": true,
3128
+ "autoincrement": false,
3129
+ "default": "'[]'"
3130
+ },
3131
+ "action_versions": {
3132
+ "name": "action_versions",
3133
+ "type": "text",
3134
+ "primaryKey": false,
3135
+ "notNull": true,
3136
+ "autoincrement": false,
3137
+ "default": "'[]'"
3138
+ },
3139
+ "revoked": {
3140
+ "name": "revoked",
3141
+ "type": "integer",
3142
+ "primaryKey": false,
3143
+ "notNull": true,
3144
+ "autoincrement": false,
3145
+ "default": "0"
3146
+ },
3147
+ "first_used_at": {
3148
+ "name": "first_used_at",
3149
+ "type": "text",
3150
+ "primaryKey": false,
3151
+ "notNull": false,
3152
+ "autoincrement": false
3153
+ },
3154
+ "last_used_at": {
3155
+ "name": "last_used_at",
3156
+ "type": "text",
3157
+ "primaryKey": false,
3158
+ "notNull": false,
3159
+ "autoincrement": false
3160
+ },
3161
+ "request_count": {
3162
+ "name": "request_count",
3163
+ "type": "integer",
3164
+ "primaryKey": false,
3165
+ "notNull": true,
3166
+ "autoincrement": false,
3167
+ "default": "0"
3168
+ },
3169
+ "success_count": {
3170
+ "name": "success_count",
3171
+ "type": "integer",
3172
+ "primaryKey": false,
3173
+ "notNull": true,
3174
+ "autoincrement": false,
3175
+ "default": "0"
3176
+ },
3177
+ "error_count": {
3178
+ "name": "error_count",
3179
+ "type": "integer",
3180
+ "primaryKey": false,
3181
+ "notNull": true,
3182
+ "autoincrement": false,
3183
+ "default": "0"
3184
+ },
3185
+ "trpc_request_count": {
3186
+ "name": "trpc_request_count",
3187
+ "type": "integer",
3188
+ "primaryKey": false,
3189
+ "notNull": true,
3190
+ "autoincrement": false,
3191
+ "default": "0"
3192
+ },
3193
+ "mcp_request_count": {
3194
+ "name": "mcp_request_count",
3195
+ "type": "integer",
3196
+ "primaryKey": false,
3197
+ "notNull": true,
3198
+ "autoincrement": false,
3199
+ "default": "0"
3200
+ },
3201
+ "last_transport": {
3202
+ "name": "last_transport",
3203
+ "type": "text",
3204
+ "primaryKey": false,
3205
+ "notNull": true,
3206
+ "autoincrement": false,
3207
+ "default": "''"
3208
+ },
3209
+ "last_outcome": {
3210
+ "name": "last_outcome",
3211
+ "type": "text",
3212
+ "primaryKey": false,
3213
+ "notNull": true,
3214
+ "autoincrement": false,
3215
+ "default": "''"
3216
+ },
3217
+ "last_status_code": {
3218
+ "name": "last_status_code",
3219
+ "type": "integer",
3220
+ "primaryKey": false,
3221
+ "notNull": false,
3222
+ "autoincrement": false
3223
+ },
3224
+ "created_at": {
3225
+ "name": "created_at",
3226
+ "type": "text",
3227
+ "primaryKey": false,
3228
+ "notNull": true,
3229
+ "autoincrement": false
3230
+ },
3231
+ "updated_at": {
3232
+ "name": "updated_at",
3233
+ "type": "text",
3234
+ "primaryKey": false,
3235
+ "notNull": true,
3236
+ "autoincrement": false
3237
+ }
3238
+ },
3239
+ "indexes": {
3240
+ "access_tokens_digest_unique": {
3241
+ "name": "access_tokens_digest_unique",
3242
+ "columns": [
3243
+ "digest"
3244
+ ],
3245
+ "isUnique": true
3246
+ }
3247
+ },
3248
+ "foreignKeys": {
3249
+ "access_tokens_workspace_id_workspaces_id_fk": {
3250
+ "name": "access_tokens_workspace_id_workspaces_id_fk",
3251
+ "tableFrom": "access_tokens",
3252
+ "tableTo": "workspaces",
3253
+ "columnsFrom": [
3254
+ "workspace_id"
3255
+ ],
3256
+ "columnsTo": [
3257
+ "id"
3258
+ ],
3259
+ "onDelete": "cascade",
3260
+ "onUpdate": "no action"
3261
+ },
3262
+ "access_tokens_actor_id_users_id_fk": {
3263
+ "name": "access_tokens_actor_id_users_id_fk",
3264
+ "tableFrom": "access_tokens",
3265
+ "tableTo": "users",
3266
+ "columnsFrom": [
3267
+ "actor_id"
3268
+ ],
3269
+ "columnsTo": [
3270
+ "id"
3271
+ ],
3272
+ "onDelete": "restrict",
3273
+ "onUpdate": "no action"
3274
+ }
3275
+ },
3276
+ "compositePrimaryKeys": {},
3277
+ "uniqueConstraints": {},
3278
+ "checkConstraints": {}
3279
+ },
3280
+ "mcp_connections": {
3281
+ "name": "mcp_connections",
3282
+ "columns": {
3283
+ "plugin_id": {
3284
+ "name": "plugin_id",
3285
+ "type": "text",
3286
+ "primaryKey": true,
3287
+ "notNull": true,
3288
+ "autoincrement": false
3289
+ },
3290
+ "workspace_id": {
3291
+ "name": "workspace_id",
3292
+ "type": "integer",
3293
+ "primaryKey": false,
3294
+ "notNull": true,
3295
+ "autoincrement": false
3296
+ },
3297
+ "endpoint": {
3298
+ "name": "endpoint",
3299
+ "type": "text",
3300
+ "primaryKey": false,
3301
+ "notNull": true,
3302
+ "autoincrement": false
3303
+ },
3304
+ "transport": {
3305
+ "name": "transport",
3306
+ "type": "text",
3307
+ "primaryKey": false,
3308
+ "notNull": true,
3309
+ "autoincrement": false,
3310
+ "default": "'auto'"
3311
+ },
3312
+ "auth_mode": {
3313
+ "name": "auth_mode",
3314
+ "type": "text",
3315
+ "primaryKey": false,
3316
+ "notNull": true,
3317
+ "autoincrement": false,
3318
+ "default": "'none'"
3319
+ },
3320
+ "revision": {
3321
+ "name": "revision",
3322
+ "type": "integer",
3323
+ "primaryKey": false,
3324
+ "notNull": true,
3325
+ "autoincrement": false,
3326
+ "default": 0
3327
+ },
3328
+ "catalogue": {
3329
+ "name": "catalogue",
3330
+ "type": "text",
3331
+ "primaryKey": false,
3332
+ "notNull": true,
3333
+ "autoincrement": false,
3334
+ "default": "'[]'"
3335
+ },
3336
+ "enabled_tools": {
3337
+ "name": "enabled_tools",
3338
+ "type": "text",
3339
+ "primaryKey": false,
3340
+ "notNull": true,
3341
+ "autoincrement": false,
3342
+ "default": "'[]'"
3343
+ },
3344
+ "aliases": {
3345
+ "name": "aliases",
3346
+ "type": "text",
3347
+ "primaryKey": false,
3348
+ "notNull": true,
3349
+ "autoincrement": false,
3350
+ "default": "'{}'"
3351
+ },
3352
+ "candidate": {
3353
+ "name": "candidate",
3354
+ "type": "text",
3355
+ "primaryKey": false,
3356
+ "notNull": false,
3357
+ "autoincrement": false
3358
+ },
3359
+ "discovery_run_id": {
3360
+ "name": "discovery_run_id",
3361
+ "type": "text",
3362
+ "primaryKey": false,
3363
+ "notNull": false,
3364
+ "autoincrement": false
3365
+ },
3366
+ "status": {
3367
+ "name": "status",
3368
+ "type": "text",
3369
+ "primaryKey": false,
3370
+ "notNull": true,
3371
+ "autoincrement": false,
3372
+ "default": "'unchecked'"
3373
+ },
3374
+ "checked_at": {
3375
+ "name": "checked_at",
3376
+ "type": "text",
3377
+ "primaryKey": false,
3378
+ "notNull": false,
3379
+ "autoincrement": false
3380
+ }
3381
+ },
3382
+ "indexes": {},
3383
+ "foreignKeys": {
3384
+ "mcp_connections_plugin_id_plugins_id_fk": {
3385
+ "name": "mcp_connections_plugin_id_plugins_id_fk",
3386
+ "tableFrom": "mcp_connections",
3387
+ "tableTo": "plugins",
3388
+ "columnsFrom": [
3389
+ "plugin_id"
3390
+ ],
3391
+ "columnsTo": [
3392
+ "id"
3393
+ ],
3394
+ "onDelete": "cascade",
3395
+ "onUpdate": "no action"
3396
+ },
3397
+ "mcp_connections_workspace_id_workspaces_id_fk": {
3398
+ "name": "mcp_connections_workspace_id_workspaces_id_fk",
3399
+ "tableFrom": "mcp_connections",
3400
+ "tableTo": "workspaces",
3401
+ "columnsFrom": [
3402
+ "workspace_id"
3403
+ ],
3404
+ "columnsTo": [
3405
+ "id"
3406
+ ],
3407
+ "onDelete": "cascade",
3408
+ "onUpdate": "no action"
3409
+ }
3410
+ },
3411
+ "compositePrimaryKeys": {},
3412
+ "uniqueConstraints": {},
3413
+ "checkConstraints": {}
3414
+ }
3415
+ },
3416
+ "views": {},
3417
+ "enums": {},
3418
+ "_meta": {
3419
+ "schemas": {},
3420
+ "tables": {},
3421
+ "columns": {}
3422
+ },
3423
+ "internal": {
3424
+ "indexes": {
3425
+ "one_pending_invitation": {
3426
+ "columns": {
3427
+ "\"email\" COLLATE NOCASE": {
3428
+ "isExpression": true
3429
+ }
3430
+ }
3431
+ },
3432
+ "users_email_unique": {
3433
+ "columns": {
3434
+ "\"email\" COLLATE NOCASE": {
3435
+ "isExpression": true
3436
+ }
3437
+ }
3438
+ },
3439
+ "users_username_unique": {
3440
+ "columns": {
3441
+ "\"username\" COLLATE NOCASE": {
3442
+ "isExpression": true
3443
+ }
3444
+ }
3445
+ },
3446
+ "workspaces_host_unique": {
3447
+ "columns": {
3448
+ "\"host\" COLLATE NOCASE": {
3449
+ "isExpression": true
3450
+ }
3451
+ }
3452
+ }
3453
+ }
3454
+ }
3455
+ }