@maudecode/kanvil 0.0.0-stage → 0.1.2

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 (97) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -2
  3. package/apps/server/.env.example +41 -0
  4. package/apps/server/dist/auth-BscXb1NQ.mjs +2666 -0
  5. package/apps/server/dist/config-Qxr_7oqZ.mjs +575 -0
  6. package/apps/server/dist/configure.mjs +23 -0
  7. package/apps/server/dist/index.mjs +1754 -0
  8. package/apps/server/dist/migrate-C9f4ozB4.mjs +17 -0
  9. package/apps/server/dist/migrate.mjs +12 -0
  10. package/apps/server/dist/recover.mjs +52 -0
  11. package/apps/server/drizzle/0000_foundation.sql +437 -0
  12. package/apps/server/drizzle/0001_claim_identity.sql +1 -0
  13. package/apps/server/drizzle/0002_transactional_attachments.sql +6 -0
  14. package/apps/server/drizzle/0003_durable_claim_fence.sql +4 -0
  15. package/apps/server/drizzle/0004_lumpy_archangel.sql +6 -0
  16. package/apps/server/drizzle/0005_unique_toxin.sql +28 -0
  17. package/apps/server/drizzle/0006_instance_services.sql +48 -0
  18. package/apps/server/drizzle/0007_optional_broker.sql +6 -0
  19. package/apps/server/drizzle/0008_workspaces.sql +37 -0
  20. package/apps/server/drizzle/0009_project_icons.sql +6 -0
  21. package/apps/server/drizzle/0010_project_labels.sql +14 -0
  22. package/apps/server/drizzle/0011_due_dates.sql +1 -0
  23. package/apps/server/drizzle/0012_label_colors.sql +7 -0
  24. package/apps/server/drizzle/meta/0000_snapshot.json +3210 -0
  25. package/apps/server/drizzle/meta/0001_snapshot.json +3216 -0
  26. package/apps/server/drizzle/meta/0002_snapshot.json +3255 -0
  27. package/apps/server/drizzle/meta/0003_snapshot.json +3262 -0
  28. package/apps/server/drizzle/meta/0004_snapshot.json +3302 -0
  29. package/apps/server/drizzle/meta/0005_snapshot.json +3518 -0
  30. package/apps/server/drizzle/meta/0006_snapshot.json +3842 -0
  31. package/apps/server/drizzle/meta/0007_snapshot.json +3874 -0
  32. package/apps/server/drizzle/meta/0008_snapshot.json +4051 -0
  33. package/apps/server/drizzle/meta/0009_snapshot.json +4105 -0
  34. package/apps/server/drizzle/meta/0010_snapshot.json +4174 -0
  35. package/apps/server/drizzle/meta/0011_snapshot.json +4180 -0
  36. package/apps/server/drizzle/meta/0012_snapshot.json +4226 -0
  37. package/apps/server/drizzle/meta/_journal.json +97 -0
  38. package/apps/web/dist/apple-touch-icon.png +0 -0
  39. package/apps/web/dist/assets/CompositeItem-D9KvUNiq.js +1 -0
  40. package/apps/web/dist/assets/admin-settings-B0u2-aAK.js +1 -0
  41. package/apps/web/dist/assets/camera-Cv5wKkKn.js +1 -0
  42. package/apps/web/dist/assets/date-picker-lhXxKIlN.js +1 -0
  43. package/apps/web/dist/assets/ellipsis-CN74O_EP.js +1 -0
  44. package/apps/web/dist/assets/forms-456UbfIC.js +92 -0
  45. package/apps/web/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  46. package/apps/web/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  47. package/apps/web/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  48. package/apps/web/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  49. package/apps/web/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  50. package/apps/web/dist/assets/index-CVzq9BMC.css +2 -0
  51. package/apps/web/dist/assets/index-Dt8wYIVA.js +51 -0
  52. package/apps/web/dist/assets/instance-BCNvOvYa.js +1 -0
  53. package/apps/web/dist/assets/list-order-1UoOT5nR.js +1 -0
  54. package/apps/web/dist/assets/lucide-U995NW8E.js +1 -0
  55. package/apps/web/dist/assets/member-directory-C81ugis6.js +1 -0
  56. package/apps/web/dist/assets/popover-BWk65ByY.js +1 -0
  57. package/apps/web/dist/assets/project-settings-DnpVfVf5.js +1 -0
  58. package/apps/web/dist/assets/rotate-ccw-BLeWpuu1.js +1 -0
  59. package/apps/web/dist/assets/settings-DUXuOgWn.js +1 -0
  60. package/apps/web/dist/assets/settings-layout-xR4hrfte.js +1 -0
  61. package/apps/web/dist/assets/table-BQbZG4BK.js +1 -0
  62. package/apps/web/dist/assets/ticket-detail-B9M_eaVu.js +2 -0
  63. package/apps/web/dist/assets/ticket-editor-Chg1lDuU.js +1 -0
  64. package/apps/web/dist/assets/ticket-list-C8500tXj.js +5 -0
  65. package/apps/web/dist/assets/ticket-tags-cbwQ93Gt.js +1 -0
  66. package/apps/web/dist/assets/upload-5Wg5ou_Z.js +1 -0
  67. package/apps/web/dist/assets/workspace-settings-Dte44Kkx.js +1 -0
  68. package/apps/web/dist/brand/icon-192.png +0 -0
  69. package/apps/web/dist/brand/icon-512.png +0 -0
  70. package/apps/web/dist/brand/mark-blue.svg +1 -0
  71. package/apps/web/dist/brand/mark-white.svg +1 -0
  72. package/apps/web/dist/brand/mark.svg +1 -0
  73. package/apps/web/dist/brand/maskable-512.png +0 -0
  74. package/apps/web/dist/brand/social.png +0 -0
  75. package/apps/web/dist/favicon.ico +0 -0
  76. package/apps/web/dist/favicon.svg +1 -0
  77. package/apps/web/dist/fonts/OFL.txt +93 -0
  78. package/apps/web/dist/fonts/ibm-plex-sans-latin.woff2 +0 -0
  79. package/apps/web/dist/icon.svg +1 -0
  80. package/apps/web/dist/index.html +31 -0
  81. package/apps/web/dist/site.webmanifest +29 -0
  82. package/apps/web/dist/third-party-icons.txt +64 -0
  83. package/apps/web/dist/third-party-themes.txt +548 -0
  84. package/bin/kanvil.mjs +27 -0
  85. package/compose.yml +66 -0
  86. package/docs/api.md +87 -0
  87. package/docs/branding.md +13 -0
  88. package/docs/design.md +37 -0
  89. package/docs/infrastructure.md +94 -0
  90. package/docs/mobile.md +77 -0
  91. package/docs/plan.md +111 -0
  92. package/docs/releasing.md +18 -0
  93. package/docs/self-hosting.md +204 -0
  94. package/docs/themes.md +38 -0
  95. package/docs/verification.md +83 -0
  96. package/docs/workspaces.md +21 -0
  97. package/package.json +45 -4
@@ -0,0 +1,4226 @@
1
+ {
2
+ "id": "9ede8992-fd22-4f59-aa81-c3d48846f55f",
3
+ "prevId": "737b4823-c34b-4c95-ad03-bac9d26465ce",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.account": {
8
+ "name": "account",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "account_id": {
18
+ "name": "account_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "provider_id": {
24
+ "name": "provider_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "user_id": {
30
+ "name": "user_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "access_token": {
36
+ "name": "access_token",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "refresh_token": {
42
+ "name": "refresh_token",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "id_token": {
48
+ "name": "id_token",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "access_token_expires_at": {
54
+ "name": "access_token_expires_at",
55
+ "type": "timestamp",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "refresh_token_expires_at": {
60
+ "name": "refresh_token_expires_at",
61
+ "type": "timestamp",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "scope": {
66
+ "name": "scope",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "password": {
72
+ "name": "password",
73
+ "type": "text",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "created_at": {
78
+ "name": "created_at",
79
+ "type": "timestamp",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "default": "now()"
83
+ },
84
+ "updated_at": {
85
+ "name": "updated_at",
86
+ "type": "timestamp",
87
+ "primaryKey": false,
88
+ "notNull": true
89
+ }
90
+ },
91
+ "indexes": {
92
+ "account_userId_idx": {
93
+ "name": "account_userId_idx",
94
+ "columns": [
95
+ {
96
+ "expression": "user_id",
97
+ "isExpression": false,
98
+ "asc": true,
99
+ "nulls": "last"
100
+ }
101
+ ],
102
+ "isUnique": false,
103
+ "concurrently": false,
104
+ "method": "btree",
105
+ "with": {}
106
+ }
107
+ },
108
+ "foreignKeys": {
109
+ "account_user_id_user_id_fk": {
110
+ "name": "account_user_id_user_id_fk",
111
+ "tableFrom": "account",
112
+ "tableTo": "user",
113
+ "columnsFrom": [
114
+ "user_id"
115
+ ],
116
+ "columnsTo": [
117
+ "id"
118
+ ],
119
+ "onDelete": "cascade",
120
+ "onUpdate": "no action"
121
+ }
122
+ },
123
+ "compositePrimaryKeys": {},
124
+ "uniqueConstraints": {},
125
+ "policies": {},
126
+ "checkConstraints": {},
127
+ "isRLSEnabled": false
128
+ },
129
+ "public.apikey": {
130
+ "name": "apikey",
131
+ "schema": "",
132
+ "columns": {
133
+ "id": {
134
+ "name": "id",
135
+ "type": "text",
136
+ "primaryKey": true,
137
+ "notNull": true
138
+ },
139
+ "config_id": {
140
+ "name": "config_id",
141
+ "type": "text",
142
+ "primaryKey": false,
143
+ "notNull": true,
144
+ "default": "'default'"
145
+ },
146
+ "name": {
147
+ "name": "name",
148
+ "type": "text",
149
+ "primaryKey": false,
150
+ "notNull": false
151
+ },
152
+ "start": {
153
+ "name": "start",
154
+ "type": "text",
155
+ "primaryKey": false,
156
+ "notNull": false
157
+ },
158
+ "reference_id": {
159
+ "name": "reference_id",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": true
163
+ },
164
+ "prefix": {
165
+ "name": "prefix",
166
+ "type": "text",
167
+ "primaryKey": false,
168
+ "notNull": false
169
+ },
170
+ "key": {
171
+ "name": "key",
172
+ "type": "text",
173
+ "primaryKey": false,
174
+ "notNull": true
175
+ },
176
+ "refill_interval": {
177
+ "name": "refill_interval",
178
+ "type": "integer",
179
+ "primaryKey": false,
180
+ "notNull": false
181
+ },
182
+ "refill_amount": {
183
+ "name": "refill_amount",
184
+ "type": "integer",
185
+ "primaryKey": false,
186
+ "notNull": false
187
+ },
188
+ "last_refill_at": {
189
+ "name": "last_refill_at",
190
+ "type": "timestamp",
191
+ "primaryKey": false,
192
+ "notNull": false
193
+ },
194
+ "enabled": {
195
+ "name": "enabled",
196
+ "type": "boolean",
197
+ "primaryKey": false,
198
+ "notNull": false,
199
+ "default": true
200
+ },
201
+ "rate_limit_enabled": {
202
+ "name": "rate_limit_enabled",
203
+ "type": "boolean",
204
+ "primaryKey": false,
205
+ "notNull": false,
206
+ "default": true
207
+ },
208
+ "rate_limit_time_window": {
209
+ "name": "rate_limit_time_window",
210
+ "type": "integer",
211
+ "primaryKey": false,
212
+ "notNull": false,
213
+ "default": 86400000
214
+ },
215
+ "rate_limit_max": {
216
+ "name": "rate_limit_max",
217
+ "type": "integer",
218
+ "primaryKey": false,
219
+ "notNull": false,
220
+ "default": 10
221
+ },
222
+ "request_count": {
223
+ "name": "request_count",
224
+ "type": "integer",
225
+ "primaryKey": false,
226
+ "notNull": false,
227
+ "default": 0
228
+ },
229
+ "remaining": {
230
+ "name": "remaining",
231
+ "type": "integer",
232
+ "primaryKey": false,
233
+ "notNull": false
234
+ },
235
+ "last_request": {
236
+ "name": "last_request",
237
+ "type": "timestamp",
238
+ "primaryKey": false,
239
+ "notNull": false
240
+ },
241
+ "expires_at": {
242
+ "name": "expires_at",
243
+ "type": "timestamp",
244
+ "primaryKey": false,
245
+ "notNull": false
246
+ },
247
+ "created_at": {
248
+ "name": "created_at",
249
+ "type": "timestamp",
250
+ "primaryKey": false,
251
+ "notNull": true
252
+ },
253
+ "updated_at": {
254
+ "name": "updated_at",
255
+ "type": "timestamp",
256
+ "primaryKey": false,
257
+ "notNull": true
258
+ },
259
+ "permissions": {
260
+ "name": "permissions",
261
+ "type": "text",
262
+ "primaryKey": false,
263
+ "notNull": false
264
+ },
265
+ "metadata": {
266
+ "name": "metadata",
267
+ "type": "text",
268
+ "primaryKey": false,
269
+ "notNull": false
270
+ }
271
+ },
272
+ "indexes": {
273
+ "apikey_configId_idx": {
274
+ "name": "apikey_configId_idx",
275
+ "columns": [
276
+ {
277
+ "expression": "config_id",
278
+ "isExpression": false,
279
+ "asc": true,
280
+ "nulls": "last"
281
+ }
282
+ ],
283
+ "isUnique": false,
284
+ "concurrently": false,
285
+ "method": "btree",
286
+ "with": {}
287
+ },
288
+ "apikey_referenceId_idx": {
289
+ "name": "apikey_referenceId_idx",
290
+ "columns": [
291
+ {
292
+ "expression": "reference_id",
293
+ "isExpression": false,
294
+ "asc": true,
295
+ "nulls": "last"
296
+ }
297
+ ],
298
+ "isUnique": false,
299
+ "concurrently": false,
300
+ "method": "btree",
301
+ "with": {}
302
+ },
303
+ "apikey_key_idx": {
304
+ "name": "apikey_key_idx",
305
+ "columns": [
306
+ {
307
+ "expression": "key",
308
+ "isExpression": false,
309
+ "asc": true,
310
+ "nulls": "last"
311
+ }
312
+ ],
313
+ "isUnique": false,
314
+ "concurrently": false,
315
+ "method": "btree",
316
+ "with": {}
317
+ }
318
+ },
319
+ "foreignKeys": {},
320
+ "compositePrimaryKeys": {},
321
+ "uniqueConstraints": {},
322
+ "policies": {},
323
+ "checkConstraints": {},
324
+ "isRLSEnabled": false
325
+ },
326
+ "public.jwks": {
327
+ "name": "jwks",
328
+ "schema": "",
329
+ "columns": {
330
+ "id": {
331
+ "name": "id",
332
+ "type": "text",
333
+ "primaryKey": true,
334
+ "notNull": true
335
+ },
336
+ "public_key": {
337
+ "name": "public_key",
338
+ "type": "text",
339
+ "primaryKey": false,
340
+ "notNull": true
341
+ },
342
+ "private_key": {
343
+ "name": "private_key",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": true
347
+ },
348
+ "created_at": {
349
+ "name": "created_at",
350
+ "type": "timestamp",
351
+ "primaryKey": false,
352
+ "notNull": true
353
+ },
354
+ "expires_at": {
355
+ "name": "expires_at",
356
+ "type": "timestamp",
357
+ "primaryKey": false,
358
+ "notNull": false
359
+ },
360
+ "alg": {
361
+ "name": "alg",
362
+ "type": "text",
363
+ "primaryKey": false,
364
+ "notNull": false
365
+ },
366
+ "crv": {
367
+ "name": "crv",
368
+ "type": "text",
369
+ "primaryKey": false,
370
+ "notNull": false
371
+ }
372
+ },
373
+ "indexes": {},
374
+ "foreignKeys": {},
375
+ "compositePrimaryKeys": {},
376
+ "uniqueConstraints": {},
377
+ "policies": {},
378
+ "checkConstraints": {},
379
+ "isRLSEnabled": false
380
+ },
381
+ "public.oauth_access_token": {
382
+ "name": "oauth_access_token",
383
+ "schema": "",
384
+ "columns": {
385
+ "id": {
386
+ "name": "id",
387
+ "type": "text",
388
+ "primaryKey": true,
389
+ "notNull": true
390
+ },
391
+ "token": {
392
+ "name": "token",
393
+ "type": "text",
394
+ "primaryKey": false,
395
+ "notNull": true
396
+ },
397
+ "client_id": {
398
+ "name": "client_id",
399
+ "type": "text",
400
+ "primaryKey": false,
401
+ "notNull": true
402
+ },
403
+ "session_id": {
404
+ "name": "session_id",
405
+ "type": "text",
406
+ "primaryKey": false,
407
+ "notNull": false
408
+ },
409
+ "user_id": {
410
+ "name": "user_id",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": false
414
+ },
415
+ "reference_id": {
416
+ "name": "reference_id",
417
+ "type": "text",
418
+ "primaryKey": false,
419
+ "notNull": false
420
+ },
421
+ "authorization_code_id": {
422
+ "name": "authorization_code_id",
423
+ "type": "text",
424
+ "primaryKey": false,
425
+ "notNull": false
426
+ },
427
+ "resources": {
428
+ "name": "resources",
429
+ "type": "text[]",
430
+ "primaryKey": false,
431
+ "notNull": false
432
+ },
433
+ "requested_user_info_claims": {
434
+ "name": "requested_user_info_claims",
435
+ "type": "text[]",
436
+ "primaryKey": false,
437
+ "notNull": false
438
+ },
439
+ "refresh_id": {
440
+ "name": "refresh_id",
441
+ "type": "text",
442
+ "primaryKey": false,
443
+ "notNull": false
444
+ },
445
+ "expires_at": {
446
+ "name": "expires_at",
447
+ "type": "timestamp",
448
+ "primaryKey": false,
449
+ "notNull": true
450
+ },
451
+ "created_at": {
452
+ "name": "created_at",
453
+ "type": "timestamp",
454
+ "primaryKey": false,
455
+ "notNull": true
456
+ },
457
+ "revoked": {
458
+ "name": "revoked",
459
+ "type": "timestamp",
460
+ "primaryKey": false,
461
+ "notNull": false
462
+ },
463
+ "confirmation": {
464
+ "name": "confirmation",
465
+ "type": "jsonb",
466
+ "primaryKey": false,
467
+ "notNull": false
468
+ },
469
+ "scopes": {
470
+ "name": "scopes",
471
+ "type": "text[]",
472
+ "primaryKey": false,
473
+ "notNull": true
474
+ }
475
+ },
476
+ "indexes": {
477
+ "oauthAccessToken_clientId_idx": {
478
+ "name": "oauthAccessToken_clientId_idx",
479
+ "columns": [
480
+ {
481
+ "expression": "client_id",
482
+ "isExpression": false,
483
+ "asc": true,
484
+ "nulls": "last"
485
+ }
486
+ ],
487
+ "isUnique": false,
488
+ "concurrently": false,
489
+ "method": "btree",
490
+ "with": {}
491
+ },
492
+ "oauthAccessToken_sessionId_idx": {
493
+ "name": "oauthAccessToken_sessionId_idx",
494
+ "columns": [
495
+ {
496
+ "expression": "session_id",
497
+ "isExpression": false,
498
+ "asc": true,
499
+ "nulls": "last"
500
+ }
501
+ ],
502
+ "isUnique": false,
503
+ "concurrently": false,
504
+ "method": "btree",
505
+ "with": {}
506
+ },
507
+ "oauthAccessToken_userId_idx": {
508
+ "name": "oauthAccessToken_userId_idx",
509
+ "columns": [
510
+ {
511
+ "expression": "user_id",
512
+ "isExpression": false,
513
+ "asc": true,
514
+ "nulls": "last"
515
+ }
516
+ ],
517
+ "isUnique": false,
518
+ "concurrently": false,
519
+ "method": "btree",
520
+ "with": {}
521
+ },
522
+ "oauthAccessToken_authorizationCodeId_idx": {
523
+ "name": "oauthAccessToken_authorizationCodeId_idx",
524
+ "columns": [
525
+ {
526
+ "expression": "authorization_code_id",
527
+ "isExpression": false,
528
+ "asc": true,
529
+ "nulls": "last"
530
+ }
531
+ ],
532
+ "isUnique": false,
533
+ "concurrently": false,
534
+ "method": "btree",
535
+ "with": {}
536
+ },
537
+ "oauthAccessToken_refreshId_idx": {
538
+ "name": "oauthAccessToken_refreshId_idx",
539
+ "columns": [
540
+ {
541
+ "expression": "refresh_id",
542
+ "isExpression": false,
543
+ "asc": true,
544
+ "nulls": "last"
545
+ }
546
+ ],
547
+ "isUnique": false,
548
+ "concurrently": false,
549
+ "method": "btree",
550
+ "with": {}
551
+ }
552
+ },
553
+ "foreignKeys": {
554
+ "oauth_access_token_client_id_oauth_client_client_id_fk": {
555
+ "name": "oauth_access_token_client_id_oauth_client_client_id_fk",
556
+ "tableFrom": "oauth_access_token",
557
+ "tableTo": "oauth_client",
558
+ "columnsFrom": [
559
+ "client_id"
560
+ ],
561
+ "columnsTo": [
562
+ "client_id"
563
+ ],
564
+ "onDelete": "cascade",
565
+ "onUpdate": "no action"
566
+ },
567
+ "oauth_access_token_session_id_session_id_fk": {
568
+ "name": "oauth_access_token_session_id_session_id_fk",
569
+ "tableFrom": "oauth_access_token",
570
+ "tableTo": "session",
571
+ "columnsFrom": [
572
+ "session_id"
573
+ ],
574
+ "columnsTo": [
575
+ "id"
576
+ ],
577
+ "onDelete": "set null",
578
+ "onUpdate": "no action"
579
+ },
580
+ "oauth_access_token_user_id_user_id_fk": {
581
+ "name": "oauth_access_token_user_id_user_id_fk",
582
+ "tableFrom": "oauth_access_token",
583
+ "tableTo": "user",
584
+ "columnsFrom": [
585
+ "user_id"
586
+ ],
587
+ "columnsTo": [
588
+ "id"
589
+ ],
590
+ "onDelete": "cascade",
591
+ "onUpdate": "no action"
592
+ },
593
+ "oauth_access_token_refresh_id_oauth_refresh_token_id_fk": {
594
+ "name": "oauth_access_token_refresh_id_oauth_refresh_token_id_fk",
595
+ "tableFrom": "oauth_access_token",
596
+ "tableTo": "oauth_refresh_token",
597
+ "columnsFrom": [
598
+ "refresh_id"
599
+ ],
600
+ "columnsTo": [
601
+ "id"
602
+ ],
603
+ "onDelete": "cascade",
604
+ "onUpdate": "no action"
605
+ }
606
+ },
607
+ "compositePrimaryKeys": {},
608
+ "uniqueConstraints": {
609
+ "oauth_access_token_token_unique": {
610
+ "name": "oauth_access_token_token_unique",
611
+ "nullsNotDistinct": false,
612
+ "columns": [
613
+ "token"
614
+ ]
615
+ }
616
+ },
617
+ "policies": {},
618
+ "checkConstraints": {},
619
+ "isRLSEnabled": false
620
+ },
621
+ "public.oauth_client": {
622
+ "name": "oauth_client",
623
+ "schema": "",
624
+ "columns": {
625
+ "id": {
626
+ "name": "id",
627
+ "type": "text",
628
+ "primaryKey": true,
629
+ "notNull": true
630
+ },
631
+ "client_id": {
632
+ "name": "client_id",
633
+ "type": "text",
634
+ "primaryKey": false,
635
+ "notNull": true
636
+ },
637
+ "client_secret": {
638
+ "name": "client_secret",
639
+ "type": "text",
640
+ "primaryKey": false,
641
+ "notNull": false
642
+ },
643
+ "client_discovery_id": {
644
+ "name": "client_discovery_id",
645
+ "type": "text",
646
+ "primaryKey": false,
647
+ "notNull": false
648
+ },
649
+ "disabled": {
650
+ "name": "disabled",
651
+ "type": "boolean",
652
+ "primaryKey": false,
653
+ "notNull": false,
654
+ "default": false
655
+ },
656
+ "skip_consent": {
657
+ "name": "skip_consent",
658
+ "type": "boolean",
659
+ "primaryKey": false,
660
+ "notNull": false
661
+ },
662
+ "enable_end_session": {
663
+ "name": "enable_end_session",
664
+ "type": "boolean",
665
+ "primaryKey": false,
666
+ "notNull": false
667
+ },
668
+ "subject_type": {
669
+ "name": "subject_type",
670
+ "type": "text",
671
+ "primaryKey": false,
672
+ "notNull": false
673
+ },
674
+ "scopes": {
675
+ "name": "scopes",
676
+ "type": "text[]",
677
+ "primaryKey": false,
678
+ "notNull": false
679
+ },
680
+ "client_credentials_scopes": {
681
+ "name": "client_credentials_scopes",
682
+ "type": "text[]",
683
+ "primaryKey": false,
684
+ "notNull": false,
685
+ "default": "'{}'"
686
+ },
687
+ "user_id": {
688
+ "name": "user_id",
689
+ "type": "text",
690
+ "primaryKey": false,
691
+ "notNull": false
692
+ },
693
+ "created_at": {
694
+ "name": "created_at",
695
+ "type": "timestamp",
696
+ "primaryKey": false,
697
+ "notNull": false
698
+ },
699
+ "updated_at": {
700
+ "name": "updated_at",
701
+ "type": "timestamp",
702
+ "primaryKey": false,
703
+ "notNull": false
704
+ },
705
+ "name": {
706
+ "name": "name",
707
+ "type": "text",
708
+ "primaryKey": false,
709
+ "notNull": false
710
+ },
711
+ "uri": {
712
+ "name": "uri",
713
+ "type": "text",
714
+ "primaryKey": false,
715
+ "notNull": false
716
+ },
717
+ "icon": {
718
+ "name": "icon",
719
+ "type": "text",
720
+ "primaryKey": false,
721
+ "notNull": false
722
+ },
723
+ "contacts": {
724
+ "name": "contacts",
725
+ "type": "text[]",
726
+ "primaryKey": false,
727
+ "notNull": false
728
+ },
729
+ "tos": {
730
+ "name": "tos",
731
+ "type": "text",
732
+ "primaryKey": false,
733
+ "notNull": false
734
+ },
735
+ "policy": {
736
+ "name": "policy",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": false
740
+ },
741
+ "software_id": {
742
+ "name": "software_id",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": false
746
+ },
747
+ "software_version": {
748
+ "name": "software_version",
749
+ "type": "text",
750
+ "primaryKey": false,
751
+ "notNull": false
752
+ },
753
+ "software_statement": {
754
+ "name": "software_statement",
755
+ "type": "text",
756
+ "primaryKey": false,
757
+ "notNull": false
758
+ },
759
+ "redirect_uris": {
760
+ "name": "redirect_uris",
761
+ "type": "text[]",
762
+ "primaryKey": false,
763
+ "notNull": true
764
+ },
765
+ "post_logout_redirect_uris": {
766
+ "name": "post_logout_redirect_uris",
767
+ "type": "text[]",
768
+ "primaryKey": false,
769
+ "notNull": false
770
+ },
771
+ "backchannel_logout_uri": {
772
+ "name": "backchannel_logout_uri",
773
+ "type": "text",
774
+ "primaryKey": false,
775
+ "notNull": false
776
+ },
777
+ "backchannel_logout_session_required": {
778
+ "name": "backchannel_logout_session_required",
779
+ "type": "boolean",
780
+ "primaryKey": false,
781
+ "notNull": false
782
+ },
783
+ "token_endpoint_auth_method": {
784
+ "name": "token_endpoint_auth_method",
785
+ "type": "text",
786
+ "primaryKey": false,
787
+ "notNull": false
788
+ },
789
+ "application_type": {
790
+ "name": "application_type",
791
+ "type": "text",
792
+ "primaryKey": false,
793
+ "notNull": false
794
+ },
795
+ "jwks": {
796
+ "name": "jwks",
797
+ "type": "text",
798
+ "primaryKey": false,
799
+ "notNull": false
800
+ },
801
+ "jwks_uri": {
802
+ "name": "jwks_uri",
803
+ "type": "text",
804
+ "primaryKey": false,
805
+ "notNull": false
806
+ },
807
+ "grant_types": {
808
+ "name": "grant_types",
809
+ "type": "text[]",
810
+ "primaryKey": false,
811
+ "notNull": false
812
+ },
813
+ "response_types": {
814
+ "name": "response_types",
815
+ "type": "text[]",
816
+ "primaryKey": false,
817
+ "notNull": false
818
+ },
819
+ "require_pkce": {
820
+ "name": "require_pkce",
821
+ "type": "boolean",
822
+ "primaryKey": false,
823
+ "notNull": false
824
+ },
825
+ "dpop_bound_access_tokens": {
826
+ "name": "dpop_bound_access_tokens",
827
+ "type": "boolean",
828
+ "primaryKey": false,
829
+ "notNull": false,
830
+ "default": false
831
+ },
832
+ "reference_id": {
833
+ "name": "reference_id",
834
+ "type": "text",
835
+ "primaryKey": false,
836
+ "notNull": false
837
+ },
838
+ "metadata": {
839
+ "name": "metadata",
840
+ "type": "jsonb",
841
+ "primaryKey": false,
842
+ "notNull": false
843
+ }
844
+ },
845
+ "indexes": {
846
+ "oauthClient_userId_idx": {
847
+ "name": "oauthClient_userId_idx",
848
+ "columns": [
849
+ {
850
+ "expression": "user_id",
851
+ "isExpression": false,
852
+ "asc": true,
853
+ "nulls": "last"
854
+ }
855
+ ],
856
+ "isUnique": false,
857
+ "concurrently": false,
858
+ "method": "btree",
859
+ "with": {}
860
+ }
861
+ },
862
+ "foreignKeys": {
863
+ "oauth_client_user_id_user_id_fk": {
864
+ "name": "oauth_client_user_id_user_id_fk",
865
+ "tableFrom": "oauth_client",
866
+ "tableTo": "user",
867
+ "columnsFrom": [
868
+ "user_id"
869
+ ],
870
+ "columnsTo": [
871
+ "id"
872
+ ],
873
+ "onDelete": "cascade",
874
+ "onUpdate": "no action"
875
+ }
876
+ },
877
+ "compositePrimaryKeys": {},
878
+ "uniqueConstraints": {
879
+ "oauth_client_client_id_unique": {
880
+ "name": "oauth_client_client_id_unique",
881
+ "nullsNotDistinct": false,
882
+ "columns": [
883
+ "client_id"
884
+ ]
885
+ }
886
+ },
887
+ "policies": {},
888
+ "checkConstraints": {},
889
+ "isRLSEnabled": false
890
+ },
891
+ "public.oauth_client_assertion": {
892
+ "name": "oauth_client_assertion",
893
+ "schema": "",
894
+ "columns": {
895
+ "id": {
896
+ "name": "id",
897
+ "type": "text",
898
+ "primaryKey": true,
899
+ "notNull": true
900
+ },
901
+ "expires_at": {
902
+ "name": "expires_at",
903
+ "type": "timestamp",
904
+ "primaryKey": false,
905
+ "notNull": true
906
+ }
907
+ },
908
+ "indexes": {},
909
+ "foreignKeys": {},
910
+ "compositePrimaryKeys": {},
911
+ "uniqueConstraints": {},
912
+ "policies": {},
913
+ "checkConstraints": {},
914
+ "isRLSEnabled": false
915
+ },
916
+ "public.oauth_client_resource": {
917
+ "name": "oauth_client_resource",
918
+ "schema": "",
919
+ "columns": {
920
+ "id": {
921
+ "name": "id",
922
+ "type": "text",
923
+ "primaryKey": true,
924
+ "notNull": true
925
+ },
926
+ "client_id": {
927
+ "name": "client_id",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": true
931
+ },
932
+ "resource_id": {
933
+ "name": "resource_id",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true
937
+ },
938
+ "metadata": {
939
+ "name": "metadata",
940
+ "type": "jsonb",
941
+ "primaryKey": false,
942
+ "notNull": false
943
+ },
944
+ "created_at": {
945
+ "name": "created_at",
946
+ "type": "timestamp",
947
+ "primaryKey": false,
948
+ "notNull": false
949
+ }
950
+ },
951
+ "indexes": {
952
+ "oauthClientResource_clientId_resourceId_uidx": {
953
+ "name": "oauthClientResource_clientId_resourceId_uidx",
954
+ "columns": [
955
+ {
956
+ "expression": "client_id",
957
+ "isExpression": false,
958
+ "asc": true,
959
+ "nulls": "last"
960
+ },
961
+ {
962
+ "expression": "resource_id",
963
+ "isExpression": false,
964
+ "asc": true,
965
+ "nulls": "last"
966
+ }
967
+ ],
968
+ "isUnique": true,
969
+ "concurrently": false,
970
+ "method": "btree",
971
+ "with": {}
972
+ },
973
+ "oauthClientResource_clientId_idx": {
974
+ "name": "oauthClientResource_clientId_idx",
975
+ "columns": [
976
+ {
977
+ "expression": "client_id",
978
+ "isExpression": false,
979
+ "asc": true,
980
+ "nulls": "last"
981
+ }
982
+ ],
983
+ "isUnique": false,
984
+ "concurrently": false,
985
+ "method": "btree",
986
+ "with": {}
987
+ },
988
+ "oauthClientResource_resourceId_idx": {
989
+ "name": "oauthClientResource_resourceId_idx",
990
+ "columns": [
991
+ {
992
+ "expression": "resource_id",
993
+ "isExpression": false,
994
+ "asc": true,
995
+ "nulls": "last"
996
+ }
997
+ ],
998
+ "isUnique": false,
999
+ "concurrently": false,
1000
+ "method": "btree",
1001
+ "with": {}
1002
+ }
1003
+ },
1004
+ "foreignKeys": {
1005
+ "oauth_client_resource_client_id_oauth_client_client_id_fk": {
1006
+ "name": "oauth_client_resource_client_id_oauth_client_client_id_fk",
1007
+ "tableFrom": "oauth_client_resource",
1008
+ "tableTo": "oauth_client",
1009
+ "columnsFrom": [
1010
+ "client_id"
1011
+ ],
1012
+ "columnsTo": [
1013
+ "client_id"
1014
+ ],
1015
+ "onDelete": "cascade",
1016
+ "onUpdate": "no action"
1017
+ },
1018
+ "oauth_client_resource_resource_id_oauth_resource_identifier_fk": {
1019
+ "name": "oauth_client_resource_resource_id_oauth_resource_identifier_fk",
1020
+ "tableFrom": "oauth_client_resource",
1021
+ "tableTo": "oauth_resource",
1022
+ "columnsFrom": [
1023
+ "resource_id"
1024
+ ],
1025
+ "columnsTo": [
1026
+ "identifier"
1027
+ ],
1028
+ "onDelete": "cascade",
1029
+ "onUpdate": "no action"
1030
+ }
1031
+ },
1032
+ "compositePrimaryKeys": {},
1033
+ "uniqueConstraints": {},
1034
+ "policies": {},
1035
+ "checkConstraints": {},
1036
+ "isRLSEnabled": false
1037
+ },
1038
+ "public.oauth_consent": {
1039
+ "name": "oauth_consent",
1040
+ "schema": "",
1041
+ "columns": {
1042
+ "id": {
1043
+ "name": "id",
1044
+ "type": "text",
1045
+ "primaryKey": true,
1046
+ "notNull": true
1047
+ },
1048
+ "client_id": {
1049
+ "name": "client_id",
1050
+ "type": "text",
1051
+ "primaryKey": false,
1052
+ "notNull": true
1053
+ },
1054
+ "user_id": {
1055
+ "name": "user_id",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": false
1059
+ },
1060
+ "reference_id": {
1061
+ "name": "reference_id",
1062
+ "type": "text",
1063
+ "primaryKey": false,
1064
+ "notNull": false
1065
+ },
1066
+ "resources": {
1067
+ "name": "resources",
1068
+ "type": "text[]",
1069
+ "primaryKey": false,
1070
+ "notNull": false
1071
+ },
1072
+ "requested_user_info_claims": {
1073
+ "name": "requested_user_info_claims",
1074
+ "type": "text[]",
1075
+ "primaryKey": false,
1076
+ "notNull": false
1077
+ },
1078
+ "scopes": {
1079
+ "name": "scopes",
1080
+ "type": "text[]",
1081
+ "primaryKey": false,
1082
+ "notNull": true
1083
+ },
1084
+ "created_at": {
1085
+ "name": "created_at",
1086
+ "type": "timestamp",
1087
+ "primaryKey": false,
1088
+ "notNull": true
1089
+ },
1090
+ "updated_at": {
1091
+ "name": "updated_at",
1092
+ "type": "timestamp",
1093
+ "primaryKey": false,
1094
+ "notNull": true
1095
+ }
1096
+ },
1097
+ "indexes": {
1098
+ "oauthConsent_clientId_idx": {
1099
+ "name": "oauthConsent_clientId_idx",
1100
+ "columns": [
1101
+ {
1102
+ "expression": "client_id",
1103
+ "isExpression": false,
1104
+ "asc": true,
1105
+ "nulls": "last"
1106
+ }
1107
+ ],
1108
+ "isUnique": false,
1109
+ "concurrently": false,
1110
+ "method": "btree",
1111
+ "with": {}
1112
+ },
1113
+ "oauthConsent_userId_idx": {
1114
+ "name": "oauthConsent_userId_idx",
1115
+ "columns": [
1116
+ {
1117
+ "expression": "user_id",
1118
+ "isExpression": false,
1119
+ "asc": true,
1120
+ "nulls": "last"
1121
+ }
1122
+ ],
1123
+ "isUnique": false,
1124
+ "concurrently": false,
1125
+ "method": "btree",
1126
+ "with": {}
1127
+ }
1128
+ },
1129
+ "foreignKeys": {
1130
+ "oauth_consent_client_id_oauth_client_client_id_fk": {
1131
+ "name": "oauth_consent_client_id_oauth_client_client_id_fk",
1132
+ "tableFrom": "oauth_consent",
1133
+ "tableTo": "oauth_client",
1134
+ "columnsFrom": [
1135
+ "client_id"
1136
+ ],
1137
+ "columnsTo": [
1138
+ "client_id"
1139
+ ],
1140
+ "onDelete": "cascade",
1141
+ "onUpdate": "no action"
1142
+ },
1143
+ "oauth_consent_user_id_user_id_fk": {
1144
+ "name": "oauth_consent_user_id_user_id_fk",
1145
+ "tableFrom": "oauth_consent",
1146
+ "tableTo": "user",
1147
+ "columnsFrom": [
1148
+ "user_id"
1149
+ ],
1150
+ "columnsTo": [
1151
+ "id"
1152
+ ],
1153
+ "onDelete": "cascade",
1154
+ "onUpdate": "no action"
1155
+ }
1156
+ },
1157
+ "compositePrimaryKeys": {},
1158
+ "uniqueConstraints": {},
1159
+ "policies": {},
1160
+ "checkConstraints": {},
1161
+ "isRLSEnabled": false
1162
+ },
1163
+ "public.oauth_refresh_token": {
1164
+ "name": "oauth_refresh_token",
1165
+ "schema": "",
1166
+ "columns": {
1167
+ "id": {
1168
+ "name": "id",
1169
+ "type": "text",
1170
+ "primaryKey": true,
1171
+ "notNull": true
1172
+ },
1173
+ "token": {
1174
+ "name": "token",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": true
1178
+ },
1179
+ "client_id": {
1180
+ "name": "client_id",
1181
+ "type": "text",
1182
+ "primaryKey": false,
1183
+ "notNull": true
1184
+ },
1185
+ "session_id": {
1186
+ "name": "session_id",
1187
+ "type": "text",
1188
+ "primaryKey": false,
1189
+ "notNull": false
1190
+ },
1191
+ "user_id": {
1192
+ "name": "user_id",
1193
+ "type": "text",
1194
+ "primaryKey": false,
1195
+ "notNull": true
1196
+ },
1197
+ "reference_id": {
1198
+ "name": "reference_id",
1199
+ "type": "text",
1200
+ "primaryKey": false,
1201
+ "notNull": false
1202
+ },
1203
+ "authorization_code_id": {
1204
+ "name": "authorization_code_id",
1205
+ "type": "text",
1206
+ "primaryKey": false,
1207
+ "notNull": false
1208
+ },
1209
+ "resources": {
1210
+ "name": "resources",
1211
+ "type": "text[]",
1212
+ "primaryKey": false,
1213
+ "notNull": false
1214
+ },
1215
+ "requested_user_info_claims": {
1216
+ "name": "requested_user_info_claims",
1217
+ "type": "text[]",
1218
+ "primaryKey": false,
1219
+ "notNull": false
1220
+ },
1221
+ "expires_at": {
1222
+ "name": "expires_at",
1223
+ "type": "timestamp",
1224
+ "primaryKey": false,
1225
+ "notNull": true
1226
+ },
1227
+ "created_at": {
1228
+ "name": "created_at",
1229
+ "type": "timestamp",
1230
+ "primaryKey": false,
1231
+ "notNull": true
1232
+ },
1233
+ "revoked": {
1234
+ "name": "revoked",
1235
+ "type": "timestamp",
1236
+ "primaryKey": false,
1237
+ "notNull": false
1238
+ },
1239
+ "rotated_at": {
1240
+ "name": "rotated_at",
1241
+ "type": "timestamp",
1242
+ "primaryKey": false,
1243
+ "notNull": false
1244
+ },
1245
+ "rotation_replay_response": {
1246
+ "name": "rotation_replay_response",
1247
+ "type": "text",
1248
+ "primaryKey": false,
1249
+ "notNull": false
1250
+ },
1251
+ "rotation_replay_expires_at": {
1252
+ "name": "rotation_replay_expires_at",
1253
+ "type": "timestamp",
1254
+ "primaryKey": false,
1255
+ "notNull": false
1256
+ },
1257
+ "auth_time": {
1258
+ "name": "auth_time",
1259
+ "type": "timestamp",
1260
+ "primaryKey": false,
1261
+ "notNull": false
1262
+ },
1263
+ "confirmation": {
1264
+ "name": "confirmation",
1265
+ "type": "jsonb",
1266
+ "primaryKey": false,
1267
+ "notNull": false
1268
+ },
1269
+ "scopes": {
1270
+ "name": "scopes",
1271
+ "type": "text[]",
1272
+ "primaryKey": false,
1273
+ "notNull": true
1274
+ }
1275
+ },
1276
+ "indexes": {
1277
+ "oauthRefreshToken_clientId_idx": {
1278
+ "name": "oauthRefreshToken_clientId_idx",
1279
+ "columns": [
1280
+ {
1281
+ "expression": "client_id",
1282
+ "isExpression": false,
1283
+ "asc": true,
1284
+ "nulls": "last"
1285
+ }
1286
+ ],
1287
+ "isUnique": false,
1288
+ "concurrently": false,
1289
+ "method": "btree",
1290
+ "with": {}
1291
+ },
1292
+ "oauthRefreshToken_sessionId_idx": {
1293
+ "name": "oauthRefreshToken_sessionId_idx",
1294
+ "columns": [
1295
+ {
1296
+ "expression": "session_id",
1297
+ "isExpression": false,
1298
+ "asc": true,
1299
+ "nulls": "last"
1300
+ }
1301
+ ],
1302
+ "isUnique": false,
1303
+ "concurrently": false,
1304
+ "method": "btree",
1305
+ "with": {}
1306
+ },
1307
+ "oauthRefreshToken_userId_idx": {
1308
+ "name": "oauthRefreshToken_userId_idx",
1309
+ "columns": [
1310
+ {
1311
+ "expression": "user_id",
1312
+ "isExpression": false,
1313
+ "asc": true,
1314
+ "nulls": "last"
1315
+ }
1316
+ ],
1317
+ "isUnique": false,
1318
+ "concurrently": false,
1319
+ "method": "btree",
1320
+ "with": {}
1321
+ },
1322
+ "oauthRefreshToken_authorizationCodeId_idx": {
1323
+ "name": "oauthRefreshToken_authorizationCodeId_idx",
1324
+ "columns": [
1325
+ {
1326
+ "expression": "authorization_code_id",
1327
+ "isExpression": false,
1328
+ "asc": true,
1329
+ "nulls": "last"
1330
+ }
1331
+ ],
1332
+ "isUnique": false,
1333
+ "concurrently": false,
1334
+ "method": "btree",
1335
+ "with": {}
1336
+ }
1337
+ },
1338
+ "foreignKeys": {
1339
+ "oauth_refresh_token_client_id_oauth_client_client_id_fk": {
1340
+ "name": "oauth_refresh_token_client_id_oauth_client_client_id_fk",
1341
+ "tableFrom": "oauth_refresh_token",
1342
+ "tableTo": "oauth_client",
1343
+ "columnsFrom": [
1344
+ "client_id"
1345
+ ],
1346
+ "columnsTo": [
1347
+ "client_id"
1348
+ ],
1349
+ "onDelete": "cascade",
1350
+ "onUpdate": "no action"
1351
+ },
1352
+ "oauth_refresh_token_session_id_session_id_fk": {
1353
+ "name": "oauth_refresh_token_session_id_session_id_fk",
1354
+ "tableFrom": "oauth_refresh_token",
1355
+ "tableTo": "session",
1356
+ "columnsFrom": [
1357
+ "session_id"
1358
+ ],
1359
+ "columnsTo": [
1360
+ "id"
1361
+ ],
1362
+ "onDelete": "set null",
1363
+ "onUpdate": "no action"
1364
+ },
1365
+ "oauth_refresh_token_user_id_user_id_fk": {
1366
+ "name": "oauth_refresh_token_user_id_user_id_fk",
1367
+ "tableFrom": "oauth_refresh_token",
1368
+ "tableTo": "user",
1369
+ "columnsFrom": [
1370
+ "user_id"
1371
+ ],
1372
+ "columnsTo": [
1373
+ "id"
1374
+ ],
1375
+ "onDelete": "cascade",
1376
+ "onUpdate": "no action"
1377
+ }
1378
+ },
1379
+ "compositePrimaryKeys": {},
1380
+ "uniqueConstraints": {
1381
+ "oauth_refresh_token_token_unique": {
1382
+ "name": "oauth_refresh_token_token_unique",
1383
+ "nullsNotDistinct": false,
1384
+ "columns": [
1385
+ "token"
1386
+ ]
1387
+ }
1388
+ },
1389
+ "policies": {},
1390
+ "checkConstraints": {},
1391
+ "isRLSEnabled": false
1392
+ },
1393
+ "public.oauth_resource": {
1394
+ "name": "oauth_resource",
1395
+ "schema": "",
1396
+ "columns": {
1397
+ "id": {
1398
+ "name": "id",
1399
+ "type": "text",
1400
+ "primaryKey": true,
1401
+ "notNull": true
1402
+ },
1403
+ "identifier": {
1404
+ "name": "identifier",
1405
+ "type": "text",
1406
+ "primaryKey": false,
1407
+ "notNull": true
1408
+ },
1409
+ "name": {
1410
+ "name": "name",
1411
+ "type": "text",
1412
+ "primaryKey": false,
1413
+ "notNull": true
1414
+ },
1415
+ "access_token_ttl": {
1416
+ "name": "access_token_ttl",
1417
+ "type": "integer",
1418
+ "primaryKey": false,
1419
+ "notNull": false
1420
+ },
1421
+ "refresh_token_ttl": {
1422
+ "name": "refresh_token_ttl",
1423
+ "type": "integer",
1424
+ "primaryKey": false,
1425
+ "notNull": false
1426
+ },
1427
+ "signing_algorithm": {
1428
+ "name": "signing_algorithm",
1429
+ "type": "text",
1430
+ "primaryKey": false,
1431
+ "notNull": false
1432
+ },
1433
+ "signing_key_id": {
1434
+ "name": "signing_key_id",
1435
+ "type": "text",
1436
+ "primaryKey": false,
1437
+ "notNull": false
1438
+ },
1439
+ "allowed_scopes": {
1440
+ "name": "allowed_scopes",
1441
+ "type": "text[]",
1442
+ "primaryKey": false,
1443
+ "notNull": false
1444
+ },
1445
+ "custom_claims": {
1446
+ "name": "custom_claims",
1447
+ "type": "jsonb",
1448
+ "primaryKey": false,
1449
+ "notNull": false
1450
+ },
1451
+ "dpop_bound_access_tokens_required": {
1452
+ "name": "dpop_bound_access_tokens_required",
1453
+ "type": "boolean",
1454
+ "primaryKey": false,
1455
+ "notNull": false,
1456
+ "default": false
1457
+ },
1458
+ "disabled": {
1459
+ "name": "disabled",
1460
+ "type": "boolean",
1461
+ "primaryKey": false,
1462
+ "notNull": false,
1463
+ "default": false
1464
+ },
1465
+ "created_at": {
1466
+ "name": "created_at",
1467
+ "type": "timestamp",
1468
+ "primaryKey": false,
1469
+ "notNull": false
1470
+ },
1471
+ "updated_at": {
1472
+ "name": "updated_at",
1473
+ "type": "timestamp",
1474
+ "primaryKey": false,
1475
+ "notNull": false
1476
+ },
1477
+ "policy_version": {
1478
+ "name": "policy_version",
1479
+ "type": "integer",
1480
+ "primaryKey": false,
1481
+ "notNull": false,
1482
+ "default": 1
1483
+ },
1484
+ "metadata": {
1485
+ "name": "metadata",
1486
+ "type": "jsonb",
1487
+ "primaryKey": false,
1488
+ "notNull": false
1489
+ }
1490
+ },
1491
+ "indexes": {},
1492
+ "foreignKeys": {},
1493
+ "compositePrimaryKeys": {},
1494
+ "uniqueConstraints": {
1495
+ "oauth_resource_identifier_unique": {
1496
+ "name": "oauth_resource_identifier_unique",
1497
+ "nullsNotDistinct": false,
1498
+ "columns": [
1499
+ "identifier"
1500
+ ]
1501
+ }
1502
+ },
1503
+ "policies": {},
1504
+ "checkConstraints": {},
1505
+ "isRLSEnabled": false
1506
+ },
1507
+ "public.session": {
1508
+ "name": "session",
1509
+ "schema": "",
1510
+ "columns": {
1511
+ "id": {
1512
+ "name": "id",
1513
+ "type": "text",
1514
+ "primaryKey": true,
1515
+ "notNull": true
1516
+ },
1517
+ "expires_at": {
1518
+ "name": "expires_at",
1519
+ "type": "timestamp",
1520
+ "primaryKey": false,
1521
+ "notNull": true
1522
+ },
1523
+ "token": {
1524
+ "name": "token",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": true
1528
+ },
1529
+ "created_at": {
1530
+ "name": "created_at",
1531
+ "type": "timestamp",
1532
+ "primaryKey": false,
1533
+ "notNull": true,
1534
+ "default": "now()"
1535
+ },
1536
+ "updated_at": {
1537
+ "name": "updated_at",
1538
+ "type": "timestamp",
1539
+ "primaryKey": false,
1540
+ "notNull": true
1541
+ },
1542
+ "ip_address": {
1543
+ "name": "ip_address",
1544
+ "type": "text",
1545
+ "primaryKey": false,
1546
+ "notNull": false
1547
+ },
1548
+ "user_agent": {
1549
+ "name": "user_agent",
1550
+ "type": "text",
1551
+ "primaryKey": false,
1552
+ "notNull": false
1553
+ },
1554
+ "user_id": {
1555
+ "name": "user_id",
1556
+ "type": "text",
1557
+ "primaryKey": false,
1558
+ "notNull": true
1559
+ },
1560
+ "impersonated_by": {
1561
+ "name": "impersonated_by",
1562
+ "type": "text",
1563
+ "primaryKey": false,
1564
+ "notNull": false
1565
+ }
1566
+ },
1567
+ "indexes": {
1568
+ "session_userId_idx": {
1569
+ "name": "session_userId_idx",
1570
+ "columns": [
1571
+ {
1572
+ "expression": "user_id",
1573
+ "isExpression": false,
1574
+ "asc": true,
1575
+ "nulls": "last"
1576
+ }
1577
+ ],
1578
+ "isUnique": false,
1579
+ "concurrently": false,
1580
+ "method": "btree",
1581
+ "with": {}
1582
+ }
1583
+ },
1584
+ "foreignKeys": {
1585
+ "session_user_id_user_id_fk": {
1586
+ "name": "session_user_id_user_id_fk",
1587
+ "tableFrom": "session",
1588
+ "tableTo": "user",
1589
+ "columnsFrom": [
1590
+ "user_id"
1591
+ ],
1592
+ "columnsTo": [
1593
+ "id"
1594
+ ],
1595
+ "onDelete": "cascade",
1596
+ "onUpdate": "no action"
1597
+ }
1598
+ },
1599
+ "compositePrimaryKeys": {},
1600
+ "uniqueConstraints": {
1601
+ "session_token_unique": {
1602
+ "name": "session_token_unique",
1603
+ "nullsNotDistinct": false,
1604
+ "columns": [
1605
+ "token"
1606
+ ]
1607
+ }
1608
+ },
1609
+ "policies": {},
1610
+ "checkConstraints": {},
1611
+ "isRLSEnabled": false
1612
+ },
1613
+ "public.user": {
1614
+ "name": "user",
1615
+ "schema": "",
1616
+ "columns": {
1617
+ "id": {
1618
+ "name": "id",
1619
+ "type": "text",
1620
+ "primaryKey": true,
1621
+ "notNull": true
1622
+ },
1623
+ "name": {
1624
+ "name": "name",
1625
+ "type": "text",
1626
+ "primaryKey": false,
1627
+ "notNull": true
1628
+ },
1629
+ "email": {
1630
+ "name": "email",
1631
+ "type": "text",
1632
+ "primaryKey": false,
1633
+ "notNull": true
1634
+ },
1635
+ "email_verified": {
1636
+ "name": "email_verified",
1637
+ "type": "boolean",
1638
+ "primaryKey": false,
1639
+ "notNull": true,
1640
+ "default": false
1641
+ },
1642
+ "image": {
1643
+ "name": "image",
1644
+ "type": "text",
1645
+ "primaryKey": false,
1646
+ "notNull": false
1647
+ },
1648
+ "created_at": {
1649
+ "name": "created_at",
1650
+ "type": "timestamp",
1651
+ "primaryKey": false,
1652
+ "notNull": true,
1653
+ "default": "now()"
1654
+ },
1655
+ "updated_at": {
1656
+ "name": "updated_at",
1657
+ "type": "timestamp",
1658
+ "primaryKey": false,
1659
+ "notNull": true,
1660
+ "default": "now()"
1661
+ },
1662
+ "role": {
1663
+ "name": "role",
1664
+ "type": "text",
1665
+ "primaryKey": false,
1666
+ "notNull": false
1667
+ },
1668
+ "banned": {
1669
+ "name": "banned",
1670
+ "type": "boolean",
1671
+ "primaryKey": false,
1672
+ "notNull": false,
1673
+ "default": false
1674
+ },
1675
+ "ban_reason": {
1676
+ "name": "ban_reason",
1677
+ "type": "text",
1678
+ "primaryKey": false,
1679
+ "notNull": false
1680
+ },
1681
+ "ban_expires": {
1682
+ "name": "ban_expires",
1683
+ "type": "timestamp",
1684
+ "primaryKey": false,
1685
+ "notNull": false
1686
+ }
1687
+ },
1688
+ "indexes": {},
1689
+ "foreignKeys": {},
1690
+ "compositePrimaryKeys": {},
1691
+ "uniqueConstraints": {
1692
+ "user_email_unique": {
1693
+ "name": "user_email_unique",
1694
+ "nullsNotDistinct": false,
1695
+ "columns": [
1696
+ "email"
1697
+ ]
1698
+ }
1699
+ },
1700
+ "policies": {},
1701
+ "checkConstraints": {},
1702
+ "isRLSEnabled": false
1703
+ },
1704
+ "public.verification": {
1705
+ "name": "verification",
1706
+ "schema": "",
1707
+ "columns": {
1708
+ "id": {
1709
+ "name": "id",
1710
+ "type": "text",
1711
+ "primaryKey": true,
1712
+ "notNull": true
1713
+ },
1714
+ "identifier": {
1715
+ "name": "identifier",
1716
+ "type": "text",
1717
+ "primaryKey": false,
1718
+ "notNull": true
1719
+ },
1720
+ "value": {
1721
+ "name": "value",
1722
+ "type": "text",
1723
+ "primaryKey": false,
1724
+ "notNull": true
1725
+ },
1726
+ "expires_at": {
1727
+ "name": "expires_at",
1728
+ "type": "timestamp",
1729
+ "primaryKey": false,
1730
+ "notNull": true
1731
+ },
1732
+ "created_at": {
1733
+ "name": "created_at",
1734
+ "type": "timestamp",
1735
+ "primaryKey": false,
1736
+ "notNull": true,
1737
+ "default": "now()"
1738
+ },
1739
+ "updated_at": {
1740
+ "name": "updated_at",
1741
+ "type": "timestamp",
1742
+ "primaryKey": false,
1743
+ "notNull": true,
1744
+ "default": "now()"
1745
+ }
1746
+ },
1747
+ "indexes": {
1748
+ "verification_identifier_idx": {
1749
+ "name": "verification_identifier_idx",
1750
+ "columns": [
1751
+ {
1752
+ "expression": "identifier",
1753
+ "isExpression": false,
1754
+ "asc": true,
1755
+ "nulls": "last"
1756
+ }
1757
+ ],
1758
+ "isUnique": false,
1759
+ "concurrently": false,
1760
+ "method": "btree",
1761
+ "with": {}
1762
+ }
1763
+ },
1764
+ "foreignKeys": {},
1765
+ "compositePrimaryKeys": {},
1766
+ "uniqueConstraints": {},
1767
+ "policies": {},
1768
+ "checkConstraints": {},
1769
+ "isRLSEnabled": false
1770
+ },
1771
+ "public.attachment_content": {
1772
+ "name": "attachment_content",
1773
+ "schema": "",
1774
+ "columns": {
1775
+ "id": {
1776
+ "name": "id",
1777
+ "type": "uuid",
1778
+ "primaryKey": true,
1779
+ "notNull": true
1780
+ },
1781
+ "data": {
1782
+ "name": "data",
1783
+ "type": "bytea",
1784
+ "primaryKey": false,
1785
+ "notNull": true
1786
+ }
1787
+ },
1788
+ "indexes": {},
1789
+ "foreignKeys": {
1790
+ "attachment_content_id_attachments_id_fk": {
1791
+ "name": "attachment_content_id_attachments_id_fk",
1792
+ "tableFrom": "attachment_content",
1793
+ "tableTo": "attachments",
1794
+ "columnsFrom": [
1795
+ "id"
1796
+ ],
1797
+ "columnsTo": [
1798
+ "id"
1799
+ ],
1800
+ "onDelete": "cascade",
1801
+ "onUpdate": "no action"
1802
+ }
1803
+ },
1804
+ "compositePrimaryKeys": {},
1805
+ "uniqueConstraints": {},
1806
+ "policies": {},
1807
+ "checkConstraints": {},
1808
+ "isRLSEnabled": false
1809
+ },
1810
+ "public.attachments": {
1811
+ "name": "attachments",
1812
+ "schema": "",
1813
+ "columns": {
1814
+ "object_id": {
1815
+ "name": "object_id",
1816
+ "type": "uuid",
1817
+ "primaryKey": false,
1818
+ "notNull": false
1819
+ },
1820
+ "id": {
1821
+ "name": "id",
1822
+ "type": "uuid",
1823
+ "primaryKey": true,
1824
+ "notNull": true,
1825
+ "default": "gen_random_uuid()"
1826
+ },
1827
+ "project_id": {
1828
+ "name": "project_id",
1829
+ "type": "uuid",
1830
+ "primaryKey": false,
1831
+ "notNull": true
1832
+ },
1833
+ "ticket_id": {
1834
+ "name": "ticket_id",
1835
+ "type": "uuid",
1836
+ "primaryKey": false,
1837
+ "notNull": true
1838
+ },
1839
+ "actor_id": {
1840
+ "name": "actor_id",
1841
+ "type": "text",
1842
+ "primaryKey": false,
1843
+ "notNull": true
1844
+ },
1845
+ "name": {
1846
+ "name": "name",
1847
+ "type": "text",
1848
+ "primaryKey": false,
1849
+ "notNull": true
1850
+ },
1851
+ "content_type": {
1852
+ "name": "content_type",
1853
+ "type": "text",
1854
+ "primaryKey": false,
1855
+ "notNull": true
1856
+ },
1857
+ "size": {
1858
+ "name": "size",
1859
+ "type": "integer",
1860
+ "primaryKey": false,
1861
+ "notNull": true
1862
+ },
1863
+ "created_at": {
1864
+ "name": "created_at",
1865
+ "type": "timestamp with time zone",
1866
+ "primaryKey": false,
1867
+ "notNull": true,
1868
+ "default": "now()"
1869
+ }
1870
+ },
1871
+ "indexes": {},
1872
+ "foreignKeys": {
1873
+ "attachments_object_id_blob_objects_id_fk": {
1874
+ "name": "attachments_object_id_blob_objects_id_fk",
1875
+ "tableFrom": "attachments",
1876
+ "tableTo": "blob_objects",
1877
+ "columnsFrom": [
1878
+ "object_id"
1879
+ ],
1880
+ "columnsTo": [
1881
+ "id"
1882
+ ],
1883
+ "onDelete": "no action",
1884
+ "onUpdate": "no action"
1885
+ },
1886
+ "attachments_project_id_projects_id_fk": {
1887
+ "name": "attachments_project_id_projects_id_fk",
1888
+ "tableFrom": "attachments",
1889
+ "tableTo": "projects",
1890
+ "columnsFrom": [
1891
+ "project_id"
1892
+ ],
1893
+ "columnsTo": [
1894
+ "id"
1895
+ ],
1896
+ "onDelete": "cascade",
1897
+ "onUpdate": "no action"
1898
+ },
1899
+ "attachments_ticket_id_tickets_id_fk": {
1900
+ "name": "attachments_ticket_id_tickets_id_fk",
1901
+ "tableFrom": "attachments",
1902
+ "tableTo": "tickets",
1903
+ "columnsFrom": [
1904
+ "ticket_id"
1905
+ ],
1906
+ "columnsTo": [
1907
+ "id"
1908
+ ],
1909
+ "onDelete": "cascade",
1910
+ "onUpdate": "no action"
1911
+ },
1912
+ "attachments_actor_id_user_id_fk": {
1913
+ "name": "attachments_actor_id_user_id_fk",
1914
+ "tableFrom": "attachments",
1915
+ "tableTo": "user",
1916
+ "columnsFrom": [
1917
+ "actor_id"
1918
+ ],
1919
+ "columnsTo": [
1920
+ "id"
1921
+ ],
1922
+ "onDelete": "no action",
1923
+ "onUpdate": "no action"
1924
+ }
1925
+ },
1926
+ "compositePrimaryKeys": {},
1927
+ "uniqueConstraints": {},
1928
+ "policies": {},
1929
+ "checkConstraints": {},
1930
+ "isRLSEnabled": false
1931
+ },
1932
+ "public.blob_objects": {
1933
+ "name": "blob_objects",
1934
+ "schema": "",
1935
+ "columns": {
1936
+ "id": {
1937
+ "name": "id",
1938
+ "type": "uuid",
1939
+ "primaryKey": true,
1940
+ "notNull": true
1941
+ },
1942
+ "backend_id": {
1943
+ "name": "backend_id",
1944
+ "type": "uuid",
1945
+ "primaryKey": false,
1946
+ "notNull": false
1947
+ },
1948
+ "object_key": {
1949
+ "name": "object_key",
1950
+ "type": "text",
1951
+ "primaryKey": false,
1952
+ "notNull": false
1953
+ },
1954
+ "data": {
1955
+ "name": "data",
1956
+ "type": "bytea",
1957
+ "primaryKey": false,
1958
+ "notNull": false
1959
+ },
1960
+ "content_type": {
1961
+ "name": "content_type",
1962
+ "type": "text",
1963
+ "primaryKey": false,
1964
+ "notNull": true
1965
+ },
1966
+ "size": {
1967
+ "name": "size",
1968
+ "type": "integer",
1969
+ "primaryKey": false,
1970
+ "notNull": true
1971
+ },
1972
+ "sha256": {
1973
+ "name": "sha256",
1974
+ "type": "text",
1975
+ "primaryKey": false,
1976
+ "notNull": true
1977
+ },
1978
+ "created_at": {
1979
+ "name": "created_at",
1980
+ "type": "timestamp with time zone",
1981
+ "primaryKey": false,
1982
+ "notNull": true,
1983
+ "default": "now()"
1984
+ }
1985
+ },
1986
+ "indexes": {
1987
+ "blob_objects_created": {
1988
+ "name": "blob_objects_created",
1989
+ "columns": [
1990
+ {
1991
+ "expression": "created_at",
1992
+ "isExpression": false,
1993
+ "asc": true,
1994
+ "nulls": "last"
1995
+ }
1996
+ ],
1997
+ "isUnique": false,
1998
+ "concurrently": false,
1999
+ "method": "btree",
2000
+ "with": {}
2001
+ }
2002
+ },
2003
+ "foreignKeys": {
2004
+ "blob_objects_backend_id_storage_backends_id_fk": {
2005
+ "name": "blob_objects_backend_id_storage_backends_id_fk",
2006
+ "tableFrom": "blob_objects",
2007
+ "tableTo": "storage_backends",
2008
+ "columnsFrom": [
2009
+ "backend_id"
2010
+ ],
2011
+ "columnsTo": [
2012
+ "id"
2013
+ ],
2014
+ "onDelete": "no action",
2015
+ "onUpdate": "no action"
2016
+ }
2017
+ },
2018
+ "compositePrimaryKeys": {},
2019
+ "uniqueConstraints": {},
2020
+ "policies": {},
2021
+ "checkConstraints": {},
2022
+ "isRLSEnabled": false
2023
+ },
2024
+ "public.claims": {
2025
+ "name": "claims",
2026
+ "schema": "",
2027
+ "columns": {
2028
+ "id": {
2029
+ "name": "id",
2030
+ "type": "uuid",
2031
+ "primaryKey": true,
2032
+ "notNull": true,
2033
+ "default": "gen_random_uuid()"
2034
+ },
2035
+ "project_id": {
2036
+ "name": "project_id",
2037
+ "type": "uuid",
2038
+ "primaryKey": false,
2039
+ "notNull": true
2040
+ },
2041
+ "ticket_id": {
2042
+ "name": "ticket_id",
2043
+ "type": "uuid",
2044
+ "primaryKey": false,
2045
+ "notNull": true
2046
+ },
2047
+ "actor_id": {
2048
+ "name": "actor_id",
2049
+ "type": "text",
2050
+ "primaryKey": false,
2051
+ "notNull": true
2052
+ },
2053
+ "owner_id": {
2054
+ "name": "owner_id",
2055
+ "type": "text",
2056
+ "primaryKey": false,
2057
+ "notNull": true
2058
+ },
2059
+ "worker_id": {
2060
+ "name": "worker_id",
2061
+ "type": "text",
2062
+ "primaryKey": false,
2063
+ "notNull": true
2064
+ },
2065
+ "expires_at": {
2066
+ "name": "expires_at",
2067
+ "type": "timestamp with time zone",
2068
+ "primaryKey": false,
2069
+ "notNull": true
2070
+ },
2071
+ "created_at": {
2072
+ "name": "created_at",
2073
+ "type": "timestamp with time zone",
2074
+ "primaryKey": false,
2075
+ "notNull": true,
2076
+ "default": "now()"
2077
+ }
2078
+ },
2079
+ "indexes": {},
2080
+ "foreignKeys": {
2081
+ "claims_project_id_projects_id_fk": {
2082
+ "name": "claims_project_id_projects_id_fk",
2083
+ "tableFrom": "claims",
2084
+ "tableTo": "projects",
2085
+ "columnsFrom": [
2086
+ "project_id"
2087
+ ],
2088
+ "columnsTo": [
2089
+ "id"
2090
+ ],
2091
+ "onDelete": "cascade",
2092
+ "onUpdate": "no action"
2093
+ },
2094
+ "claims_ticket_id_tickets_id_fk": {
2095
+ "name": "claims_ticket_id_tickets_id_fk",
2096
+ "tableFrom": "claims",
2097
+ "tableTo": "tickets",
2098
+ "columnsFrom": [
2099
+ "ticket_id"
2100
+ ],
2101
+ "columnsTo": [
2102
+ "id"
2103
+ ],
2104
+ "onDelete": "cascade",
2105
+ "onUpdate": "no action"
2106
+ },
2107
+ "claims_actor_id_user_id_fk": {
2108
+ "name": "claims_actor_id_user_id_fk",
2109
+ "tableFrom": "claims",
2110
+ "tableTo": "user",
2111
+ "columnsFrom": [
2112
+ "actor_id"
2113
+ ],
2114
+ "columnsTo": [
2115
+ "id"
2116
+ ],
2117
+ "onDelete": "no action",
2118
+ "onUpdate": "no action"
2119
+ }
2120
+ },
2121
+ "compositePrimaryKeys": {},
2122
+ "uniqueConstraints": {
2123
+ "claims_ticket_id_unique": {
2124
+ "name": "claims_ticket_id_unique",
2125
+ "nullsNotDistinct": false,
2126
+ "columns": [
2127
+ "ticket_id"
2128
+ ]
2129
+ }
2130
+ },
2131
+ "policies": {},
2132
+ "checkConstraints": {},
2133
+ "isRLSEnabled": false
2134
+ },
2135
+ "public.comments": {
2136
+ "name": "comments",
2137
+ "schema": "",
2138
+ "columns": {
2139
+ "id": {
2140
+ "name": "id",
2141
+ "type": "uuid",
2142
+ "primaryKey": true,
2143
+ "notNull": true,
2144
+ "default": "gen_random_uuid()"
2145
+ },
2146
+ "project_id": {
2147
+ "name": "project_id",
2148
+ "type": "uuid",
2149
+ "primaryKey": false,
2150
+ "notNull": true
2151
+ },
2152
+ "ticket_id": {
2153
+ "name": "ticket_id",
2154
+ "type": "uuid",
2155
+ "primaryKey": false,
2156
+ "notNull": true
2157
+ },
2158
+ "actor_id": {
2159
+ "name": "actor_id",
2160
+ "type": "text",
2161
+ "primaryKey": false,
2162
+ "notNull": true
2163
+ },
2164
+ "body": {
2165
+ "name": "body",
2166
+ "type": "text",
2167
+ "primaryKey": false,
2168
+ "notNull": true
2169
+ },
2170
+ "version": {
2171
+ "name": "version",
2172
+ "type": "integer",
2173
+ "primaryKey": false,
2174
+ "notNull": true,
2175
+ "default": 1
2176
+ },
2177
+ "created_at": {
2178
+ "name": "created_at",
2179
+ "type": "timestamp with time zone",
2180
+ "primaryKey": false,
2181
+ "notNull": true,
2182
+ "default": "now()"
2183
+ },
2184
+ "updated_at": {
2185
+ "name": "updated_at",
2186
+ "type": "timestamp with time zone",
2187
+ "primaryKey": false,
2188
+ "notNull": true,
2189
+ "default": "now()"
2190
+ }
2191
+ },
2192
+ "indexes": {
2193
+ "comment_ticket": {
2194
+ "name": "comment_ticket",
2195
+ "columns": [
2196
+ {
2197
+ "expression": "ticket_id",
2198
+ "isExpression": false,
2199
+ "asc": true,
2200
+ "nulls": "last"
2201
+ }
2202
+ ],
2203
+ "isUnique": false,
2204
+ "concurrently": false,
2205
+ "method": "btree",
2206
+ "with": {}
2207
+ }
2208
+ },
2209
+ "foreignKeys": {
2210
+ "comments_project_id_projects_id_fk": {
2211
+ "name": "comments_project_id_projects_id_fk",
2212
+ "tableFrom": "comments",
2213
+ "tableTo": "projects",
2214
+ "columnsFrom": [
2215
+ "project_id"
2216
+ ],
2217
+ "columnsTo": [
2218
+ "id"
2219
+ ],
2220
+ "onDelete": "cascade",
2221
+ "onUpdate": "no action"
2222
+ },
2223
+ "comments_ticket_id_tickets_id_fk": {
2224
+ "name": "comments_ticket_id_tickets_id_fk",
2225
+ "tableFrom": "comments",
2226
+ "tableTo": "tickets",
2227
+ "columnsFrom": [
2228
+ "ticket_id"
2229
+ ],
2230
+ "columnsTo": [
2231
+ "id"
2232
+ ],
2233
+ "onDelete": "cascade",
2234
+ "onUpdate": "no action"
2235
+ },
2236
+ "comments_actor_id_user_id_fk": {
2237
+ "name": "comments_actor_id_user_id_fk",
2238
+ "tableFrom": "comments",
2239
+ "tableTo": "user",
2240
+ "columnsFrom": [
2241
+ "actor_id"
2242
+ ],
2243
+ "columnsTo": [
2244
+ "id"
2245
+ ],
2246
+ "onDelete": "no action",
2247
+ "onUpdate": "no action"
2248
+ }
2249
+ },
2250
+ "compositePrimaryKeys": {},
2251
+ "uniqueConstraints": {},
2252
+ "policies": {},
2253
+ "checkConstraints": {},
2254
+ "isRLSEnabled": false
2255
+ },
2256
+ "public.delivery_checkpoints": {
2257
+ "name": "delivery_checkpoints",
2258
+ "schema": "",
2259
+ "columns": {
2260
+ "destination": {
2261
+ "name": "destination",
2262
+ "type": "text",
2263
+ "primaryKey": true,
2264
+ "notNull": true
2265
+ },
2266
+ "cursor": {
2267
+ "name": "cursor",
2268
+ "type": "bigint",
2269
+ "primaryKey": false,
2270
+ "notNull": true,
2271
+ "default": "0"
2272
+ }
2273
+ },
2274
+ "indexes": {},
2275
+ "foreignKeys": {},
2276
+ "compositePrimaryKeys": {},
2277
+ "uniqueConstraints": {},
2278
+ "policies": {},
2279
+ "checkConstraints": {},
2280
+ "isRLSEnabled": false
2281
+ },
2282
+ "public.event_clock": {
2283
+ "name": "event_clock",
2284
+ "schema": "",
2285
+ "columns": {
2286
+ "id": {
2287
+ "name": "id",
2288
+ "type": "integer",
2289
+ "primaryKey": true,
2290
+ "notNull": true
2291
+ },
2292
+ "value": {
2293
+ "name": "value",
2294
+ "type": "bigint",
2295
+ "primaryKey": false,
2296
+ "notNull": true,
2297
+ "default": "0"
2298
+ },
2299
+ "floor": {
2300
+ "name": "floor",
2301
+ "type": "bigint",
2302
+ "primaryKey": false,
2303
+ "notNull": true,
2304
+ "default": "0"
2305
+ }
2306
+ },
2307
+ "indexes": {},
2308
+ "foreignKeys": {},
2309
+ "compositePrimaryKeys": {},
2310
+ "uniqueConstraints": {},
2311
+ "policies": {},
2312
+ "checkConstraints": {},
2313
+ "isRLSEnabled": false
2314
+ },
2315
+ "public.events": {
2316
+ "name": "events",
2317
+ "schema": "",
2318
+ "columns": {
2319
+ "id": {
2320
+ "name": "id",
2321
+ "type": "bigint",
2322
+ "primaryKey": true,
2323
+ "notNull": true
2324
+ },
2325
+ "project_id": {
2326
+ "name": "project_id",
2327
+ "type": "uuid",
2328
+ "primaryKey": false,
2329
+ "notNull": true
2330
+ },
2331
+ "ticket_id": {
2332
+ "name": "ticket_id",
2333
+ "type": "uuid",
2334
+ "primaryKey": false,
2335
+ "notNull": false
2336
+ },
2337
+ "actor_id": {
2338
+ "name": "actor_id",
2339
+ "type": "text",
2340
+ "primaryKey": false,
2341
+ "notNull": true
2342
+ },
2343
+ "type": {
2344
+ "name": "type",
2345
+ "type": "text",
2346
+ "primaryKey": false,
2347
+ "notNull": true
2348
+ },
2349
+ "data": {
2350
+ "name": "data",
2351
+ "type": "jsonb",
2352
+ "primaryKey": false,
2353
+ "notNull": true
2354
+ },
2355
+ "created_at": {
2356
+ "name": "created_at",
2357
+ "type": "timestamp with time zone",
2358
+ "primaryKey": false,
2359
+ "notNull": true,
2360
+ "default": "now()"
2361
+ }
2362
+ },
2363
+ "indexes": {
2364
+ "event_project_cursor": {
2365
+ "name": "event_project_cursor",
2366
+ "columns": [
2367
+ {
2368
+ "expression": "project_id",
2369
+ "isExpression": false,
2370
+ "asc": true,
2371
+ "nulls": "last"
2372
+ },
2373
+ {
2374
+ "expression": "id",
2375
+ "isExpression": false,
2376
+ "asc": true,
2377
+ "nulls": "last"
2378
+ }
2379
+ ],
2380
+ "isUnique": false,
2381
+ "concurrently": false,
2382
+ "method": "btree",
2383
+ "with": {}
2384
+ },
2385
+ "event_ticket": {
2386
+ "name": "event_ticket",
2387
+ "columns": [
2388
+ {
2389
+ "expression": "ticket_id",
2390
+ "isExpression": false,
2391
+ "asc": true,
2392
+ "nulls": "last"
2393
+ },
2394
+ {
2395
+ "expression": "id",
2396
+ "isExpression": false,
2397
+ "asc": true,
2398
+ "nulls": "last"
2399
+ }
2400
+ ],
2401
+ "isUnique": false,
2402
+ "concurrently": false,
2403
+ "method": "btree",
2404
+ "with": {}
2405
+ }
2406
+ },
2407
+ "foreignKeys": {
2408
+ "events_project_id_projects_id_fk": {
2409
+ "name": "events_project_id_projects_id_fk",
2410
+ "tableFrom": "events",
2411
+ "tableTo": "projects",
2412
+ "columnsFrom": [
2413
+ "project_id"
2414
+ ],
2415
+ "columnsTo": [
2416
+ "id"
2417
+ ],
2418
+ "onDelete": "cascade",
2419
+ "onUpdate": "no action"
2420
+ },
2421
+ "events_actor_id_user_id_fk": {
2422
+ "name": "events_actor_id_user_id_fk",
2423
+ "tableFrom": "events",
2424
+ "tableTo": "user",
2425
+ "columnsFrom": [
2426
+ "actor_id"
2427
+ ],
2428
+ "columnsTo": [
2429
+ "id"
2430
+ ],
2431
+ "onDelete": "no action",
2432
+ "onUpdate": "no action"
2433
+ }
2434
+ },
2435
+ "compositePrimaryKeys": {},
2436
+ "uniqueConstraints": {},
2437
+ "policies": {},
2438
+ "checkConstraints": {},
2439
+ "isRLSEnabled": false
2440
+ },
2441
+ "public.evidence": {
2442
+ "name": "evidence",
2443
+ "schema": "",
2444
+ "columns": {
2445
+ "id": {
2446
+ "name": "id",
2447
+ "type": "uuid",
2448
+ "primaryKey": true,
2449
+ "notNull": true,
2450
+ "default": "gen_random_uuid()"
2451
+ },
2452
+ "project_id": {
2453
+ "name": "project_id",
2454
+ "type": "uuid",
2455
+ "primaryKey": false,
2456
+ "notNull": true
2457
+ },
2458
+ "ticket_id": {
2459
+ "name": "ticket_id",
2460
+ "type": "uuid",
2461
+ "primaryKey": false,
2462
+ "notNull": true
2463
+ },
2464
+ "actor_id": {
2465
+ "name": "actor_id",
2466
+ "type": "text",
2467
+ "primaryKey": false,
2468
+ "notNull": true
2469
+ },
2470
+ "title": {
2471
+ "name": "title",
2472
+ "type": "text",
2473
+ "primaryKey": false,
2474
+ "notNull": true
2475
+ },
2476
+ "kind": {
2477
+ "name": "kind",
2478
+ "type": "text",
2479
+ "primaryKey": false,
2480
+ "notNull": true
2481
+ },
2482
+ "url": {
2483
+ "name": "url",
2484
+ "type": "text",
2485
+ "primaryKey": false,
2486
+ "notNull": true
2487
+ },
2488
+ "commit": {
2489
+ "name": "commit",
2490
+ "type": "text",
2491
+ "primaryKey": false,
2492
+ "notNull": false
2493
+ },
2494
+ "outcome": {
2495
+ "name": "outcome",
2496
+ "type": "text",
2497
+ "primaryKey": false,
2498
+ "notNull": true
2499
+ },
2500
+ "note": {
2501
+ "name": "note",
2502
+ "type": "text",
2503
+ "primaryKey": false,
2504
+ "notNull": true
2505
+ },
2506
+ "created_at": {
2507
+ "name": "created_at",
2508
+ "type": "timestamp with time zone",
2509
+ "primaryKey": false,
2510
+ "notNull": true,
2511
+ "default": "now()"
2512
+ }
2513
+ },
2514
+ "indexes": {},
2515
+ "foreignKeys": {
2516
+ "evidence_project_id_projects_id_fk": {
2517
+ "name": "evidence_project_id_projects_id_fk",
2518
+ "tableFrom": "evidence",
2519
+ "tableTo": "projects",
2520
+ "columnsFrom": [
2521
+ "project_id"
2522
+ ],
2523
+ "columnsTo": [
2524
+ "id"
2525
+ ],
2526
+ "onDelete": "cascade",
2527
+ "onUpdate": "no action"
2528
+ },
2529
+ "evidence_ticket_id_tickets_id_fk": {
2530
+ "name": "evidence_ticket_id_tickets_id_fk",
2531
+ "tableFrom": "evidence",
2532
+ "tableTo": "tickets",
2533
+ "columnsFrom": [
2534
+ "ticket_id"
2535
+ ],
2536
+ "columnsTo": [
2537
+ "id"
2538
+ ],
2539
+ "onDelete": "cascade",
2540
+ "onUpdate": "no action"
2541
+ },
2542
+ "evidence_actor_id_user_id_fk": {
2543
+ "name": "evidence_actor_id_user_id_fk",
2544
+ "tableFrom": "evidence",
2545
+ "tableTo": "user",
2546
+ "columnsFrom": [
2547
+ "actor_id"
2548
+ ],
2549
+ "columnsTo": [
2550
+ "id"
2551
+ ],
2552
+ "onDelete": "no action",
2553
+ "onUpdate": "no action"
2554
+ }
2555
+ },
2556
+ "compositePrimaryKeys": {},
2557
+ "uniqueConstraints": {},
2558
+ "policies": {},
2559
+ "checkConstraints": {},
2560
+ "isRLSEnabled": false
2561
+ },
2562
+ "public.instance_settings": {
2563
+ "name": "instance_settings",
2564
+ "schema": "",
2565
+ "columns": {
2566
+ "id": {
2567
+ "name": "id",
2568
+ "type": "integer",
2569
+ "primaryKey": true,
2570
+ "notNull": true,
2571
+ "default": 1
2572
+ },
2573
+ "identity": {
2574
+ "name": "identity",
2575
+ "type": "uuid",
2576
+ "primaryKey": false,
2577
+ "notNull": true,
2578
+ "default": "gen_random_uuid()"
2579
+ },
2580
+ "version": {
2581
+ "name": "version",
2582
+ "type": "integer",
2583
+ "primaryKey": false,
2584
+ "notNull": true,
2585
+ "default": 1
2586
+ },
2587
+ "name": {
2588
+ "name": "name",
2589
+ "type": "text",
2590
+ "primaryKey": false,
2591
+ "notNull": true,
2592
+ "default": "'Kanvil'"
2593
+ },
2594
+ "description": {
2595
+ "name": "description",
2596
+ "type": "text",
2597
+ "primaryKey": false,
2598
+ "notNull": true,
2599
+ "default": "'Ticketing for people and agents'"
2600
+ },
2601
+ "storage_backend_id": {
2602
+ "name": "storage_backend_id",
2603
+ "type": "uuid",
2604
+ "primaryKey": false,
2605
+ "notNull": false
2606
+ },
2607
+ "search_config": {
2608
+ "name": "search_config",
2609
+ "type": "text",
2610
+ "primaryKey": false,
2611
+ "notNull": false
2612
+ },
2613
+ "broker_config": {
2614
+ "name": "broker_config",
2615
+ "type": "text",
2616
+ "primaryKey": false,
2617
+ "notNull": false
2618
+ }
2619
+ },
2620
+ "indexes": {},
2621
+ "foreignKeys": {
2622
+ "instance_settings_storage_backend_id_storage_backends_id_fk": {
2623
+ "name": "instance_settings_storage_backend_id_storage_backends_id_fk",
2624
+ "tableFrom": "instance_settings",
2625
+ "tableTo": "storage_backends",
2626
+ "columnsFrom": [
2627
+ "storage_backend_id"
2628
+ ],
2629
+ "columnsTo": [
2630
+ "id"
2631
+ ],
2632
+ "onDelete": "no action",
2633
+ "onUpdate": "no action"
2634
+ }
2635
+ },
2636
+ "compositePrimaryKeys": {},
2637
+ "uniqueConstraints": {},
2638
+ "policies": {},
2639
+ "checkConstraints": {},
2640
+ "isRLSEnabled": false
2641
+ },
2642
+ "public.label_colors": {
2643
+ "name": "label_colors",
2644
+ "schema": "",
2645
+ "columns": {
2646
+ "value": {
2647
+ "name": "value",
2648
+ "type": "text",
2649
+ "primaryKey": true,
2650
+ "notNull": true
2651
+ },
2652
+ "created_by": {
2653
+ "name": "created_by",
2654
+ "type": "text",
2655
+ "primaryKey": false,
2656
+ "notNull": false
2657
+ },
2658
+ "created_at": {
2659
+ "name": "created_at",
2660
+ "type": "timestamp with time zone",
2661
+ "primaryKey": false,
2662
+ "notNull": true,
2663
+ "default": "now()"
2664
+ }
2665
+ },
2666
+ "indexes": {},
2667
+ "foreignKeys": {
2668
+ "label_colors_created_by_user_id_fk": {
2669
+ "name": "label_colors_created_by_user_id_fk",
2670
+ "tableFrom": "label_colors",
2671
+ "tableTo": "user",
2672
+ "columnsFrom": [
2673
+ "created_by"
2674
+ ],
2675
+ "columnsTo": [
2676
+ "id"
2677
+ ],
2678
+ "onDelete": "set null",
2679
+ "onUpdate": "no action"
2680
+ }
2681
+ },
2682
+ "compositePrimaryKeys": {},
2683
+ "uniqueConstraints": {},
2684
+ "policies": {},
2685
+ "checkConstraints": {},
2686
+ "isRLSEnabled": false
2687
+ },
2688
+ "public.project_members": {
2689
+ "name": "project_members",
2690
+ "schema": "",
2691
+ "columns": {
2692
+ "project_id": {
2693
+ "name": "project_id",
2694
+ "type": "uuid",
2695
+ "primaryKey": false,
2696
+ "notNull": true
2697
+ },
2698
+ "user_id": {
2699
+ "name": "user_id",
2700
+ "type": "text",
2701
+ "primaryKey": false,
2702
+ "notNull": true
2703
+ },
2704
+ "role": {
2705
+ "name": "role",
2706
+ "type": "text",
2707
+ "primaryKey": false,
2708
+ "notNull": true
2709
+ }
2710
+ },
2711
+ "indexes": {
2712
+ "member_user": {
2713
+ "name": "member_user",
2714
+ "columns": [
2715
+ {
2716
+ "expression": "user_id",
2717
+ "isExpression": false,
2718
+ "asc": true,
2719
+ "nulls": "last"
2720
+ }
2721
+ ],
2722
+ "isUnique": false,
2723
+ "concurrently": false,
2724
+ "method": "btree",
2725
+ "with": {}
2726
+ }
2727
+ },
2728
+ "foreignKeys": {
2729
+ "project_members_project_id_projects_id_fk": {
2730
+ "name": "project_members_project_id_projects_id_fk",
2731
+ "tableFrom": "project_members",
2732
+ "tableTo": "projects",
2733
+ "columnsFrom": [
2734
+ "project_id"
2735
+ ],
2736
+ "columnsTo": [
2737
+ "id"
2738
+ ],
2739
+ "onDelete": "cascade",
2740
+ "onUpdate": "no action"
2741
+ },
2742
+ "project_members_user_id_user_id_fk": {
2743
+ "name": "project_members_user_id_user_id_fk",
2744
+ "tableFrom": "project_members",
2745
+ "tableTo": "user",
2746
+ "columnsFrom": [
2747
+ "user_id"
2748
+ ],
2749
+ "columnsTo": [
2750
+ "id"
2751
+ ],
2752
+ "onDelete": "cascade",
2753
+ "onUpdate": "no action"
2754
+ }
2755
+ },
2756
+ "compositePrimaryKeys": {
2757
+ "project_members_project_id_user_id_pk": {
2758
+ "name": "project_members_project_id_user_id_pk",
2759
+ "columns": [
2760
+ "project_id",
2761
+ "user_id"
2762
+ ]
2763
+ }
2764
+ },
2765
+ "uniqueConstraints": {},
2766
+ "policies": {},
2767
+ "checkConstraints": {},
2768
+ "isRLSEnabled": false
2769
+ },
2770
+ "public.notification_preferences": {
2771
+ "name": "notification_preferences",
2772
+ "schema": "",
2773
+ "columns": {
2774
+ "user_id": {
2775
+ "name": "user_id",
2776
+ "type": "text",
2777
+ "primaryKey": true,
2778
+ "notNull": true
2779
+ },
2780
+ "in_app": {
2781
+ "name": "in_app",
2782
+ "type": "boolean",
2783
+ "primaryKey": false,
2784
+ "notNull": true,
2785
+ "default": true
2786
+ },
2787
+ "push": {
2788
+ "name": "push",
2789
+ "type": "boolean",
2790
+ "primaryKey": false,
2791
+ "notNull": true,
2792
+ "default": false
2793
+ }
2794
+ },
2795
+ "indexes": {},
2796
+ "foreignKeys": {
2797
+ "notification_preferences_user_id_user_id_fk": {
2798
+ "name": "notification_preferences_user_id_user_id_fk",
2799
+ "tableFrom": "notification_preferences",
2800
+ "tableTo": "user",
2801
+ "columnsFrom": [
2802
+ "user_id"
2803
+ ],
2804
+ "columnsTo": [
2805
+ "id"
2806
+ ],
2807
+ "onDelete": "cascade",
2808
+ "onUpdate": "no action"
2809
+ }
2810
+ },
2811
+ "compositePrimaryKeys": {},
2812
+ "uniqueConstraints": {},
2813
+ "policies": {},
2814
+ "checkConstraints": {},
2815
+ "isRLSEnabled": false
2816
+ },
2817
+ "public.notifications": {
2818
+ "name": "notifications",
2819
+ "schema": "",
2820
+ "columns": {
2821
+ "id": {
2822
+ "name": "id",
2823
+ "type": "uuid",
2824
+ "primaryKey": true,
2825
+ "notNull": true,
2826
+ "default": "gen_random_uuid()"
2827
+ },
2828
+ "user_id": {
2829
+ "name": "user_id",
2830
+ "type": "text",
2831
+ "primaryKey": false,
2832
+ "notNull": true
2833
+ },
2834
+ "project_id": {
2835
+ "name": "project_id",
2836
+ "type": "uuid",
2837
+ "primaryKey": false,
2838
+ "notNull": true
2839
+ },
2840
+ "event_id": {
2841
+ "name": "event_id",
2842
+ "type": "bigint",
2843
+ "primaryKey": false,
2844
+ "notNull": true
2845
+ },
2846
+ "read_at": {
2847
+ "name": "read_at",
2848
+ "type": "timestamp with time zone",
2849
+ "primaryKey": false,
2850
+ "notNull": false
2851
+ },
2852
+ "inbox": {
2853
+ "name": "inbox",
2854
+ "type": "boolean",
2855
+ "primaryKey": false,
2856
+ "notNull": true,
2857
+ "default": true
2858
+ },
2859
+ "created_at": {
2860
+ "name": "created_at",
2861
+ "type": "timestamp with time zone",
2862
+ "primaryKey": false,
2863
+ "notNull": true,
2864
+ "default": "now()"
2865
+ }
2866
+ },
2867
+ "indexes": {},
2868
+ "foreignKeys": {
2869
+ "notifications_user_id_user_id_fk": {
2870
+ "name": "notifications_user_id_user_id_fk",
2871
+ "tableFrom": "notifications",
2872
+ "tableTo": "user",
2873
+ "columnsFrom": [
2874
+ "user_id"
2875
+ ],
2876
+ "columnsTo": [
2877
+ "id"
2878
+ ],
2879
+ "onDelete": "cascade",
2880
+ "onUpdate": "no action"
2881
+ },
2882
+ "notifications_project_id_projects_id_fk": {
2883
+ "name": "notifications_project_id_projects_id_fk",
2884
+ "tableFrom": "notifications",
2885
+ "tableTo": "projects",
2886
+ "columnsFrom": [
2887
+ "project_id"
2888
+ ],
2889
+ "columnsTo": [
2890
+ "id"
2891
+ ],
2892
+ "onDelete": "cascade",
2893
+ "onUpdate": "no action"
2894
+ }
2895
+ },
2896
+ "compositePrimaryKeys": {},
2897
+ "uniqueConstraints": {},
2898
+ "policies": {},
2899
+ "checkConstraints": {},
2900
+ "isRLSEnabled": false
2901
+ },
2902
+ "public.profile_photos": {
2903
+ "name": "profile_photos",
2904
+ "schema": "",
2905
+ "columns": {
2906
+ "user_id": {
2907
+ "name": "user_id",
2908
+ "type": "text",
2909
+ "primaryKey": true,
2910
+ "notNull": true
2911
+ },
2912
+ "object_id": {
2913
+ "name": "object_id",
2914
+ "type": "uuid",
2915
+ "primaryKey": false,
2916
+ "notNull": true
2917
+ }
2918
+ },
2919
+ "indexes": {},
2920
+ "foreignKeys": {
2921
+ "profile_photos_user_id_user_id_fk": {
2922
+ "name": "profile_photos_user_id_user_id_fk",
2923
+ "tableFrom": "profile_photos",
2924
+ "tableTo": "user",
2925
+ "columnsFrom": [
2926
+ "user_id"
2927
+ ],
2928
+ "columnsTo": [
2929
+ "id"
2930
+ ],
2931
+ "onDelete": "cascade",
2932
+ "onUpdate": "no action"
2933
+ },
2934
+ "profile_photos_object_id_blob_objects_id_fk": {
2935
+ "name": "profile_photos_object_id_blob_objects_id_fk",
2936
+ "tableFrom": "profile_photos",
2937
+ "tableTo": "blob_objects",
2938
+ "columnsFrom": [
2939
+ "object_id"
2940
+ ],
2941
+ "columnsTo": [
2942
+ "id"
2943
+ ],
2944
+ "onDelete": "no action",
2945
+ "onUpdate": "no action"
2946
+ }
2947
+ },
2948
+ "compositePrimaryKeys": {},
2949
+ "uniqueConstraints": {},
2950
+ "policies": {},
2951
+ "checkConstraints": {},
2952
+ "isRLSEnabled": false
2953
+ },
2954
+ "public.project_labels": {
2955
+ "name": "project_labels",
2956
+ "schema": "",
2957
+ "columns": {
2958
+ "id": {
2959
+ "name": "id",
2960
+ "type": "uuid",
2961
+ "primaryKey": true,
2962
+ "notNull": true,
2963
+ "default": "gen_random_uuid()"
2964
+ },
2965
+ "project_id": {
2966
+ "name": "project_id",
2967
+ "type": "uuid",
2968
+ "primaryKey": false,
2969
+ "notNull": true
2970
+ },
2971
+ "name": {
2972
+ "name": "name",
2973
+ "type": "text",
2974
+ "primaryKey": false,
2975
+ "notNull": true
2976
+ },
2977
+ "color": {
2978
+ "name": "color",
2979
+ "type": "text",
2980
+ "primaryKey": false,
2981
+ "notNull": true,
2982
+ "default": "'gray'"
2983
+ },
2984
+ "version": {
2985
+ "name": "version",
2986
+ "type": "integer",
2987
+ "primaryKey": false,
2988
+ "notNull": true,
2989
+ "default": 1
2990
+ }
2991
+ },
2992
+ "indexes": {},
2993
+ "foreignKeys": {
2994
+ "project_labels_project_id_projects_id_fk": {
2995
+ "name": "project_labels_project_id_projects_id_fk",
2996
+ "tableFrom": "project_labels",
2997
+ "tableTo": "projects",
2998
+ "columnsFrom": [
2999
+ "project_id"
3000
+ ],
3001
+ "columnsTo": [
3002
+ "id"
3003
+ ],
3004
+ "onDelete": "cascade",
3005
+ "onUpdate": "no action"
3006
+ }
3007
+ },
3008
+ "compositePrimaryKeys": {},
3009
+ "uniqueConstraints": {
3010
+ "project_label_name": {
3011
+ "name": "project_label_name",
3012
+ "nullsNotDistinct": false,
3013
+ "columns": [
3014
+ "project_id",
3015
+ "name"
3016
+ ]
3017
+ }
3018
+ },
3019
+ "policies": {},
3020
+ "checkConstraints": {},
3021
+ "isRLSEnabled": false
3022
+ },
3023
+ "public.projects": {
3024
+ "name": "projects",
3025
+ "schema": "",
3026
+ "columns": {
3027
+ "icon_name": {
3028
+ "name": "icon_name",
3029
+ "type": "text",
3030
+ "primaryKey": false,
3031
+ "notNull": false
3032
+ },
3033
+ "icon_color": {
3034
+ "name": "icon_color",
3035
+ "type": "text",
3036
+ "primaryKey": false,
3037
+ "notNull": true,
3038
+ "default": "'default'"
3039
+ },
3040
+ "image": {
3041
+ "name": "image",
3042
+ "type": "text",
3043
+ "primaryKey": false,
3044
+ "notNull": false
3045
+ },
3046
+ "icon_object_id": {
3047
+ "name": "icon_object_id",
3048
+ "type": "uuid",
3049
+ "primaryKey": false,
3050
+ "notNull": false
3051
+ },
3052
+ "workspace_id": {
3053
+ "name": "workspace_id",
3054
+ "type": "uuid",
3055
+ "primaryKey": false,
3056
+ "notNull": true
3057
+ },
3058
+ "visibility": {
3059
+ "name": "visibility",
3060
+ "type": "text",
3061
+ "primaryKey": false,
3062
+ "notNull": true,
3063
+ "default": "'private'"
3064
+ },
3065
+ "id": {
3066
+ "name": "id",
3067
+ "type": "uuid",
3068
+ "primaryKey": true,
3069
+ "notNull": true,
3070
+ "default": "gen_random_uuid()"
3071
+ },
3072
+ "key": {
3073
+ "name": "key",
3074
+ "type": "text",
3075
+ "primaryKey": false,
3076
+ "notNull": true
3077
+ },
3078
+ "name": {
3079
+ "name": "name",
3080
+ "type": "text",
3081
+ "primaryKey": false,
3082
+ "notNull": true
3083
+ },
3084
+ "description": {
3085
+ "name": "description",
3086
+ "type": "text",
3087
+ "primaryKey": false,
3088
+ "notNull": true,
3089
+ "default": "''"
3090
+ },
3091
+ "next_number": {
3092
+ "name": "next_number",
3093
+ "type": "integer",
3094
+ "primaryKey": false,
3095
+ "notNull": true,
3096
+ "default": 1
3097
+ },
3098
+ "version": {
3099
+ "name": "version",
3100
+ "type": "integer",
3101
+ "primaryKey": false,
3102
+ "notNull": true,
3103
+ "default": 1
3104
+ },
3105
+ "created_at": {
3106
+ "name": "created_at",
3107
+ "type": "timestamp with time zone",
3108
+ "primaryKey": false,
3109
+ "notNull": true,
3110
+ "default": "now()"
3111
+ },
3112
+ "updated_at": {
3113
+ "name": "updated_at",
3114
+ "type": "timestamp with time zone",
3115
+ "primaryKey": false,
3116
+ "notNull": true,
3117
+ "default": "now()"
3118
+ }
3119
+ },
3120
+ "indexes": {
3121
+ "project_workspace": {
3122
+ "name": "project_workspace",
3123
+ "columns": [
3124
+ {
3125
+ "expression": "workspace_id",
3126
+ "isExpression": false,
3127
+ "asc": true,
3128
+ "nulls": "last"
3129
+ }
3130
+ ],
3131
+ "isUnique": false,
3132
+ "concurrently": false,
3133
+ "method": "btree",
3134
+ "with": {}
3135
+ }
3136
+ },
3137
+ "foreignKeys": {
3138
+ "projects_icon_object_id_blob_objects_id_fk": {
3139
+ "name": "projects_icon_object_id_blob_objects_id_fk",
3140
+ "tableFrom": "projects",
3141
+ "tableTo": "blob_objects",
3142
+ "columnsFrom": [
3143
+ "icon_object_id"
3144
+ ],
3145
+ "columnsTo": [
3146
+ "id"
3147
+ ],
3148
+ "onDelete": "no action",
3149
+ "onUpdate": "no action"
3150
+ },
3151
+ "projects_workspace_id_workspaces_id_fk": {
3152
+ "name": "projects_workspace_id_workspaces_id_fk",
3153
+ "tableFrom": "projects",
3154
+ "tableTo": "workspaces",
3155
+ "columnsFrom": [
3156
+ "workspace_id"
3157
+ ],
3158
+ "columnsTo": [
3159
+ "id"
3160
+ ],
3161
+ "onDelete": "no action",
3162
+ "onUpdate": "no action"
3163
+ }
3164
+ },
3165
+ "compositePrimaryKeys": {},
3166
+ "uniqueConstraints": {
3167
+ "projects_key_unique": {
3168
+ "name": "projects_key_unique",
3169
+ "nullsNotDistinct": false,
3170
+ "columns": [
3171
+ "key"
3172
+ ]
3173
+ }
3174
+ },
3175
+ "policies": {},
3176
+ "checkConstraints": {},
3177
+ "isRLSEnabled": false
3178
+ },
3179
+ "public.push_deliveries": {
3180
+ "name": "push_deliveries",
3181
+ "schema": "",
3182
+ "columns": {
3183
+ "id": {
3184
+ "name": "id",
3185
+ "type": "uuid",
3186
+ "primaryKey": true,
3187
+ "notNull": true,
3188
+ "default": "gen_random_uuid()"
3189
+ },
3190
+ "notification_id": {
3191
+ "name": "notification_id",
3192
+ "type": "uuid",
3193
+ "primaryKey": false,
3194
+ "notNull": true
3195
+ },
3196
+ "device_id": {
3197
+ "name": "device_id",
3198
+ "type": "uuid",
3199
+ "primaryKey": false,
3200
+ "notNull": true
3201
+ },
3202
+ "attempts": {
3203
+ "name": "attempts",
3204
+ "type": "integer",
3205
+ "primaryKey": false,
3206
+ "notNull": true,
3207
+ "default": 0
3208
+ },
3209
+ "available_at": {
3210
+ "name": "available_at",
3211
+ "type": "timestamp with time zone",
3212
+ "primaryKey": false,
3213
+ "notNull": true,
3214
+ "default": "now()"
3215
+ },
3216
+ "receipt_id": {
3217
+ "name": "receipt_id",
3218
+ "type": "text",
3219
+ "primaryKey": false,
3220
+ "notNull": false
3221
+ },
3222
+ "finished_at": {
3223
+ "name": "finished_at",
3224
+ "type": "timestamp with time zone",
3225
+ "primaryKey": false,
3226
+ "notNull": false
3227
+ },
3228
+ "error": {
3229
+ "name": "error",
3230
+ "type": "text",
3231
+ "primaryKey": false,
3232
+ "notNull": false
3233
+ }
3234
+ },
3235
+ "indexes": {
3236
+ "push_pending_idx": {
3237
+ "name": "push_pending_idx",
3238
+ "columns": [
3239
+ {
3240
+ "expression": "finished_at",
3241
+ "isExpression": false,
3242
+ "asc": true,
3243
+ "nulls": "last"
3244
+ },
3245
+ {
3246
+ "expression": "available_at",
3247
+ "isExpression": false,
3248
+ "asc": true,
3249
+ "nulls": "last"
3250
+ }
3251
+ ],
3252
+ "isUnique": false,
3253
+ "concurrently": false,
3254
+ "method": "btree",
3255
+ "with": {}
3256
+ }
3257
+ },
3258
+ "foreignKeys": {
3259
+ "push_deliveries_notification_id_notifications_id_fk": {
3260
+ "name": "push_deliveries_notification_id_notifications_id_fk",
3261
+ "tableFrom": "push_deliveries",
3262
+ "tableTo": "notifications",
3263
+ "columnsFrom": [
3264
+ "notification_id"
3265
+ ],
3266
+ "columnsTo": [
3267
+ "id"
3268
+ ],
3269
+ "onDelete": "cascade",
3270
+ "onUpdate": "no action"
3271
+ },
3272
+ "push_deliveries_device_id_push_devices_id_fk": {
3273
+ "name": "push_deliveries_device_id_push_devices_id_fk",
3274
+ "tableFrom": "push_deliveries",
3275
+ "tableTo": "push_devices",
3276
+ "columnsFrom": [
3277
+ "device_id"
3278
+ ],
3279
+ "columnsTo": [
3280
+ "id"
3281
+ ],
3282
+ "onDelete": "cascade",
3283
+ "onUpdate": "no action"
3284
+ }
3285
+ },
3286
+ "compositePrimaryKeys": {},
3287
+ "uniqueConstraints": {
3288
+ "push_deliveries_notification_id_device_id_unique": {
3289
+ "name": "push_deliveries_notification_id_device_id_unique",
3290
+ "nullsNotDistinct": false,
3291
+ "columns": [
3292
+ "notification_id",
3293
+ "device_id"
3294
+ ]
3295
+ }
3296
+ },
3297
+ "policies": {},
3298
+ "checkConstraints": {},
3299
+ "isRLSEnabled": false
3300
+ },
3301
+ "public.push_devices": {
3302
+ "name": "push_devices",
3303
+ "schema": "",
3304
+ "columns": {
3305
+ "id": {
3306
+ "name": "id",
3307
+ "type": "uuid",
3308
+ "primaryKey": true,
3309
+ "notNull": true,
3310
+ "default": "gen_random_uuid()"
3311
+ },
3312
+ "user_id": {
3313
+ "name": "user_id",
3314
+ "type": "text",
3315
+ "primaryKey": false,
3316
+ "notNull": true
3317
+ },
3318
+ "session_id": {
3319
+ "name": "session_id",
3320
+ "type": "text",
3321
+ "primaryKey": false,
3322
+ "notNull": true
3323
+ },
3324
+ "token": {
3325
+ "name": "token",
3326
+ "type": "text",
3327
+ "primaryKey": false,
3328
+ "notNull": true
3329
+ },
3330
+ "created_at": {
3331
+ "name": "created_at",
3332
+ "type": "timestamp with time zone",
3333
+ "primaryKey": false,
3334
+ "notNull": true,
3335
+ "default": "now()"
3336
+ }
3337
+ },
3338
+ "indexes": {},
3339
+ "foreignKeys": {
3340
+ "push_devices_user_id_user_id_fk": {
3341
+ "name": "push_devices_user_id_user_id_fk",
3342
+ "tableFrom": "push_devices",
3343
+ "tableTo": "user",
3344
+ "columnsFrom": [
3345
+ "user_id"
3346
+ ],
3347
+ "columnsTo": [
3348
+ "id"
3349
+ ],
3350
+ "onDelete": "cascade",
3351
+ "onUpdate": "no action"
3352
+ },
3353
+ "push_devices_session_id_session_id_fk": {
3354
+ "name": "push_devices_session_id_session_id_fk",
3355
+ "tableFrom": "push_devices",
3356
+ "tableTo": "session",
3357
+ "columnsFrom": [
3358
+ "session_id"
3359
+ ],
3360
+ "columnsTo": [
3361
+ "id"
3362
+ ],
3363
+ "onDelete": "cascade",
3364
+ "onUpdate": "no action"
3365
+ }
3366
+ },
3367
+ "compositePrimaryKeys": {},
3368
+ "uniqueConstraints": {
3369
+ "push_devices_token_unique": {
3370
+ "name": "push_devices_token_unique",
3371
+ "nullsNotDistinct": false,
3372
+ "columns": [
3373
+ "token"
3374
+ ]
3375
+ }
3376
+ },
3377
+ "policies": {},
3378
+ "checkConstraints": {},
3379
+ "isRLSEnabled": false
3380
+ },
3381
+ "public.mutation_receipts": {
3382
+ "name": "mutation_receipts",
3383
+ "schema": "",
3384
+ "columns": {
3385
+ "actor_id": {
3386
+ "name": "actor_id",
3387
+ "type": "text",
3388
+ "primaryKey": false,
3389
+ "notNull": true
3390
+ },
3391
+ "request_id": {
3392
+ "name": "request_id",
3393
+ "type": "uuid",
3394
+ "primaryKey": false,
3395
+ "notNull": true
3396
+ },
3397
+ "operation": {
3398
+ "name": "operation",
3399
+ "type": "text",
3400
+ "primaryKey": false,
3401
+ "notNull": true
3402
+ },
3403
+ "hash": {
3404
+ "name": "hash",
3405
+ "type": "text",
3406
+ "primaryKey": false,
3407
+ "notNull": true
3408
+ },
3409
+ "result": {
3410
+ "name": "result",
3411
+ "type": "jsonb",
3412
+ "primaryKey": false,
3413
+ "notNull": true
3414
+ },
3415
+ "created_at": {
3416
+ "name": "created_at",
3417
+ "type": "timestamp with time zone",
3418
+ "primaryKey": false,
3419
+ "notNull": true,
3420
+ "default": "now()"
3421
+ }
3422
+ },
3423
+ "indexes": {},
3424
+ "foreignKeys": {
3425
+ "mutation_receipts_actor_id_user_id_fk": {
3426
+ "name": "mutation_receipts_actor_id_user_id_fk",
3427
+ "tableFrom": "mutation_receipts",
3428
+ "tableTo": "user",
3429
+ "columnsFrom": [
3430
+ "actor_id"
3431
+ ],
3432
+ "columnsTo": [
3433
+ "id"
3434
+ ],
3435
+ "onDelete": "no action",
3436
+ "onUpdate": "no action"
3437
+ }
3438
+ },
3439
+ "compositePrimaryKeys": {
3440
+ "mutation_receipts_actor_id_request_id_pk": {
3441
+ "name": "mutation_receipts_actor_id_request_id_pk",
3442
+ "columns": [
3443
+ "actor_id",
3444
+ "request_id"
3445
+ ]
3446
+ }
3447
+ },
3448
+ "uniqueConstraints": {},
3449
+ "policies": {},
3450
+ "checkConstraints": {},
3451
+ "isRLSEnabled": false
3452
+ },
3453
+ "public.ticket_relations": {
3454
+ "name": "ticket_relations",
3455
+ "schema": "",
3456
+ "columns": {
3457
+ "id": {
3458
+ "name": "id",
3459
+ "type": "uuid",
3460
+ "primaryKey": true,
3461
+ "notNull": true,
3462
+ "default": "gen_random_uuid()"
3463
+ },
3464
+ "project_id": {
3465
+ "name": "project_id",
3466
+ "type": "uuid",
3467
+ "primaryKey": false,
3468
+ "notNull": true
3469
+ },
3470
+ "source_id": {
3471
+ "name": "source_id",
3472
+ "type": "uuid",
3473
+ "primaryKey": false,
3474
+ "notNull": true
3475
+ },
3476
+ "target_id": {
3477
+ "name": "target_id",
3478
+ "type": "uuid",
3479
+ "primaryKey": false,
3480
+ "notNull": true
3481
+ },
3482
+ "type": {
3483
+ "name": "type",
3484
+ "type": "text",
3485
+ "primaryKey": false,
3486
+ "notNull": true
3487
+ }
3488
+ },
3489
+ "indexes": {
3490
+ "relation_target": {
3491
+ "name": "relation_target",
3492
+ "columns": [
3493
+ {
3494
+ "expression": "target_id",
3495
+ "isExpression": false,
3496
+ "asc": true,
3497
+ "nulls": "last"
3498
+ }
3499
+ ],
3500
+ "isUnique": false,
3501
+ "concurrently": false,
3502
+ "method": "btree",
3503
+ "with": {}
3504
+ }
3505
+ },
3506
+ "foreignKeys": {
3507
+ "ticket_relations_project_id_projects_id_fk": {
3508
+ "name": "ticket_relations_project_id_projects_id_fk",
3509
+ "tableFrom": "ticket_relations",
3510
+ "tableTo": "projects",
3511
+ "columnsFrom": [
3512
+ "project_id"
3513
+ ],
3514
+ "columnsTo": [
3515
+ "id"
3516
+ ],
3517
+ "onDelete": "cascade",
3518
+ "onUpdate": "no action"
3519
+ },
3520
+ "ticket_relations_source_id_tickets_id_fk": {
3521
+ "name": "ticket_relations_source_id_tickets_id_fk",
3522
+ "tableFrom": "ticket_relations",
3523
+ "tableTo": "tickets",
3524
+ "columnsFrom": [
3525
+ "source_id"
3526
+ ],
3527
+ "columnsTo": [
3528
+ "id"
3529
+ ],
3530
+ "onDelete": "cascade",
3531
+ "onUpdate": "no action"
3532
+ },
3533
+ "ticket_relations_target_id_tickets_id_fk": {
3534
+ "name": "ticket_relations_target_id_tickets_id_fk",
3535
+ "tableFrom": "ticket_relations",
3536
+ "tableTo": "tickets",
3537
+ "columnsFrom": [
3538
+ "target_id"
3539
+ ],
3540
+ "columnsTo": [
3541
+ "id"
3542
+ ],
3543
+ "onDelete": "cascade",
3544
+ "onUpdate": "no action"
3545
+ }
3546
+ },
3547
+ "compositePrimaryKeys": {},
3548
+ "uniqueConstraints": {
3549
+ "ticket_relation_edge": {
3550
+ "name": "ticket_relation_edge",
3551
+ "nullsNotDistinct": false,
3552
+ "columns": [
3553
+ "source_id",
3554
+ "target_id",
3555
+ "type"
3556
+ ]
3557
+ }
3558
+ },
3559
+ "policies": {},
3560
+ "checkConstraints": {},
3561
+ "isRLSEnabled": false
3562
+ },
3563
+ "public.search_state": {
3564
+ "name": "search_state",
3565
+ "schema": "",
3566
+ "columns": {
3567
+ "id": {
3568
+ "name": "id",
3569
+ "type": "integer",
3570
+ "primaryKey": true,
3571
+ "notNull": true,
3572
+ "default": 1
3573
+ },
3574
+ "config_hash": {
3575
+ "name": "config_hash",
3576
+ "type": "text",
3577
+ "primaryKey": false,
3578
+ "notNull": true,
3579
+ "default": "''"
3580
+ },
3581
+ "cursor": {
3582
+ "name": "cursor",
3583
+ "type": "bigint",
3584
+ "primaryKey": false,
3585
+ "notNull": true,
3586
+ "default": "0"
3587
+ },
3588
+ "error": {
3589
+ "name": "error",
3590
+ "type": "text",
3591
+ "primaryKey": false,
3592
+ "notNull": false
3593
+ }
3594
+ },
3595
+ "indexes": {},
3596
+ "foreignKeys": {},
3597
+ "compositePrimaryKeys": {},
3598
+ "uniqueConstraints": {},
3599
+ "policies": {},
3600
+ "checkConstraints": {},
3601
+ "isRLSEnabled": false
3602
+ },
3603
+ "public.storage_backends": {
3604
+ "name": "storage_backends",
3605
+ "schema": "",
3606
+ "columns": {
3607
+ "id": {
3608
+ "name": "id",
3609
+ "type": "uuid",
3610
+ "primaryKey": true,
3611
+ "notNull": true,
3612
+ "default": "gen_random_uuid()"
3613
+ },
3614
+ "identity": {
3615
+ "name": "identity",
3616
+ "type": "text",
3617
+ "primaryKey": false,
3618
+ "notNull": true
3619
+ },
3620
+ "config": {
3621
+ "name": "config",
3622
+ "type": "text",
3623
+ "primaryKey": false,
3624
+ "notNull": true
3625
+ },
3626
+ "created_at": {
3627
+ "name": "created_at",
3628
+ "type": "timestamp with time zone",
3629
+ "primaryKey": false,
3630
+ "notNull": true,
3631
+ "default": "now()"
3632
+ }
3633
+ },
3634
+ "indexes": {},
3635
+ "foreignKeys": {},
3636
+ "compositePrimaryKeys": {},
3637
+ "uniqueConstraints": {
3638
+ "storage_backends_identity_unique": {
3639
+ "name": "storage_backends_identity_unique",
3640
+ "nullsNotDistinct": false,
3641
+ "columns": [
3642
+ "identity"
3643
+ ]
3644
+ }
3645
+ },
3646
+ "policies": {},
3647
+ "checkConstraints": {},
3648
+ "isRLSEnabled": false
3649
+ },
3650
+ "public.subscriptions": {
3651
+ "name": "subscriptions",
3652
+ "schema": "",
3653
+ "columns": {
3654
+ "project_id": {
3655
+ "name": "project_id",
3656
+ "type": "uuid",
3657
+ "primaryKey": false,
3658
+ "notNull": true
3659
+ },
3660
+ "ticket_id": {
3661
+ "name": "ticket_id",
3662
+ "type": "uuid",
3663
+ "primaryKey": false,
3664
+ "notNull": true
3665
+ },
3666
+ "user_id": {
3667
+ "name": "user_id",
3668
+ "type": "text",
3669
+ "primaryKey": false,
3670
+ "notNull": true
3671
+ }
3672
+ },
3673
+ "indexes": {},
3674
+ "foreignKeys": {
3675
+ "subscriptions_project_id_projects_id_fk": {
3676
+ "name": "subscriptions_project_id_projects_id_fk",
3677
+ "tableFrom": "subscriptions",
3678
+ "tableTo": "projects",
3679
+ "columnsFrom": [
3680
+ "project_id"
3681
+ ],
3682
+ "columnsTo": [
3683
+ "id"
3684
+ ],
3685
+ "onDelete": "cascade",
3686
+ "onUpdate": "no action"
3687
+ },
3688
+ "subscriptions_ticket_id_tickets_id_fk": {
3689
+ "name": "subscriptions_ticket_id_tickets_id_fk",
3690
+ "tableFrom": "subscriptions",
3691
+ "tableTo": "tickets",
3692
+ "columnsFrom": [
3693
+ "ticket_id"
3694
+ ],
3695
+ "columnsTo": [
3696
+ "id"
3697
+ ],
3698
+ "onDelete": "cascade",
3699
+ "onUpdate": "no action"
3700
+ },
3701
+ "subscriptions_user_id_user_id_fk": {
3702
+ "name": "subscriptions_user_id_user_id_fk",
3703
+ "tableFrom": "subscriptions",
3704
+ "tableTo": "user",
3705
+ "columnsFrom": [
3706
+ "user_id"
3707
+ ],
3708
+ "columnsTo": [
3709
+ "id"
3710
+ ],
3711
+ "onDelete": "cascade",
3712
+ "onUpdate": "no action"
3713
+ }
3714
+ },
3715
+ "compositePrimaryKeys": {
3716
+ "subscriptions_ticket_id_user_id_pk": {
3717
+ "name": "subscriptions_ticket_id_user_id_pk",
3718
+ "columns": [
3719
+ "ticket_id",
3720
+ "user_id"
3721
+ ]
3722
+ }
3723
+ },
3724
+ "uniqueConstraints": {},
3725
+ "policies": {},
3726
+ "checkConstraints": {},
3727
+ "isRLSEnabled": false
3728
+ },
3729
+ "public.tickets": {
3730
+ "name": "tickets",
3731
+ "schema": "",
3732
+ "columns": {
3733
+ "id": {
3734
+ "name": "id",
3735
+ "type": "uuid",
3736
+ "primaryKey": true,
3737
+ "notNull": true,
3738
+ "default": "gen_random_uuid()"
3739
+ },
3740
+ "project_id": {
3741
+ "name": "project_id",
3742
+ "type": "uuid",
3743
+ "primaryKey": false,
3744
+ "notNull": true
3745
+ },
3746
+ "key": {
3747
+ "name": "key",
3748
+ "type": "text",
3749
+ "primaryKey": false,
3750
+ "notNull": true
3751
+ },
3752
+ "number": {
3753
+ "name": "number",
3754
+ "type": "integer",
3755
+ "primaryKey": false,
3756
+ "notNull": true
3757
+ },
3758
+ "title": {
3759
+ "name": "title",
3760
+ "type": "text",
3761
+ "primaryKey": false,
3762
+ "notNull": true
3763
+ },
3764
+ "description": {
3765
+ "name": "description",
3766
+ "type": "text",
3767
+ "primaryKey": false,
3768
+ "notNull": true,
3769
+ "default": "''"
3770
+ },
3771
+ "acceptance_criteria": {
3772
+ "name": "acceptance_criteria",
3773
+ "type": "text",
3774
+ "primaryKey": false,
3775
+ "notNull": true,
3776
+ "default": "''"
3777
+ },
3778
+ "status": {
3779
+ "name": "status",
3780
+ "type": "text",
3781
+ "primaryKey": false,
3782
+ "notNull": true,
3783
+ "default": "'todo'"
3784
+ },
3785
+ "priority": {
3786
+ "name": "priority",
3787
+ "type": "text",
3788
+ "primaryKey": false,
3789
+ "notNull": true,
3790
+ "default": "'medium'"
3791
+ },
3792
+ "kind": {
3793
+ "name": "kind",
3794
+ "type": "text",
3795
+ "primaryKey": false,
3796
+ "notNull": true,
3797
+ "default": "'feature'"
3798
+ },
3799
+ "difficulty": {
3800
+ "name": "difficulty",
3801
+ "type": "text",
3802
+ "primaryKey": false,
3803
+ "notNull": false
3804
+ },
3805
+ "labels": {
3806
+ "name": "labels",
3807
+ "type": "text[]",
3808
+ "primaryKey": false,
3809
+ "notNull": true,
3810
+ "default": "'{}'"
3811
+ },
3812
+ "scopes": {
3813
+ "name": "scopes",
3814
+ "type": "text[]",
3815
+ "primaryKey": false,
3816
+ "notNull": true,
3817
+ "default": "'{}'"
3818
+ },
3819
+ "assignee_id": {
3820
+ "name": "assignee_id",
3821
+ "type": "text",
3822
+ "primaryKey": false,
3823
+ "notNull": false
3824
+ },
3825
+ "parent_id": {
3826
+ "name": "parent_id",
3827
+ "type": "uuid",
3828
+ "primaryKey": false,
3829
+ "notNull": false
3830
+ },
3831
+ "automation_ready": {
3832
+ "name": "automation_ready",
3833
+ "type": "boolean",
3834
+ "primaryKey": false,
3835
+ "notNull": true,
3836
+ "default": false
3837
+ },
3838
+ "claim_required": {
3839
+ "name": "claim_required",
3840
+ "type": "boolean",
3841
+ "primaryKey": false,
3842
+ "notNull": true,
3843
+ "default": false
3844
+ },
3845
+ "hold_reason": {
3846
+ "name": "hold_reason",
3847
+ "type": "text",
3848
+ "primaryKey": false,
3849
+ "notNull": false
3850
+ },
3851
+ "due_at": {
3852
+ "name": "due_at",
3853
+ "type": "timestamp with time zone",
3854
+ "primaryKey": false,
3855
+ "notNull": false
3856
+ },
3857
+ "archived": {
3858
+ "name": "archived",
3859
+ "type": "boolean",
3860
+ "primaryKey": false,
3861
+ "notNull": true,
3862
+ "default": false
3863
+ },
3864
+ "created_by": {
3865
+ "name": "created_by",
3866
+ "type": "text",
3867
+ "primaryKey": false,
3868
+ "notNull": true
3869
+ },
3870
+ "version": {
3871
+ "name": "version",
3872
+ "type": "integer",
3873
+ "primaryKey": false,
3874
+ "notNull": true,
3875
+ "default": 1
3876
+ },
3877
+ "created_at": {
3878
+ "name": "created_at",
3879
+ "type": "timestamp with time zone",
3880
+ "primaryKey": false,
3881
+ "notNull": true,
3882
+ "default": "now()"
3883
+ },
3884
+ "updated_at": {
3885
+ "name": "updated_at",
3886
+ "type": "timestamp with time zone",
3887
+ "primaryKey": false,
3888
+ "notNull": true,
3889
+ "default": "now()"
3890
+ }
3891
+ },
3892
+ "indexes": {
3893
+ "ticket_project_status": {
3894
+ "name": "ticket_project_status",
3895
+ "columns": [
3896
+ {
3897
+ "expression": "project_id",
3898
+ "isExpression": false,
3899
+ "asc": true,
3900
+ "nulls": "last"
3901
+ },
3902
+ {
3903
+ "expression": "status",
3904
+ "isExpression": false,
3905
+ "asc": true,
3906
+ "nulls": "last"
3907
+ }
3908
+ ],
3909
+ "isUnique": false,
3910
+ "concurrently": false,
3911
+ "method": "btree",
3912
+ "with": {}
3913
+ },
3914
+ "ticket_parent": {
3915
+ "name": "ticket_parent",
3916
+ "columns": [
3917
+ {
3918
+ "expression": "parent_id",
3919
+ "isExpression": false,
3920
+ "asc": true,
3921
+ "nulls": "last"
3922
+ }
3923
+ ],
3924
+ "isUnique": false,
3925
+ "concurrently": false,
3926
+ "method": "btree",
3927
+ "with": {}
3928
+ }
3929
+ },
3930
+ "foreignKeys": {
3931
+ "tickets_project_id_projects_id_fk": {
3932
+ "name": "tickets_project_id_projects_id_fk",
3933
+ "tableFrom": "tickets",
3934
+ "tableTo": "projects",
3935
+ "columnsFrom": [
3936
+ "project_id"
3937
+ ],
3938
+ "columnsTo": [
3939
+ "id"
3940
+ ],
3941
+ "onDelete": "cascade",
3942
+ "onUpdate": "no action"
3943
+ },
3944
+ "tickets_assignee_id_user_id_fk": {
3945
+ "name": "tickets_assignee_id_user_id_fk",
3946
+ "tableFrom": "tickets",
3947
+ "tableTo": "user",
3948
+ "columnsFrom": [
3949
+ "assignee_id"
3950
+ ],
3951
+ "columnsTo": [
3952
+ "id"
3953
+ ],
3954
+ "onDelete": "set null",
3955
+ "onUpdate": "no action"
3956
+ },
3957
+ "tickets_created_by_user_id_fk": {
3958
+ "name": "tickets_created_by_user_id_fk",
3959
+ "tableFrom": "tickets",
3960
+ "tableTo": "user",
3961
+ "columnsFrom": [
3962
+ "created_by"
3963
+ ],
3964
+ "columnsTo": [
3965
+ "id"
3966
+ ],
3967
+ "onDelete": "no action",
3968
+ "onUpdate": "no action"
3969
+ }
3970
+ },
3971
+ "compositePrimaryKeys": {},
3972
+ "uniqueConstraints": {
3973
+ "tickets_key_unique": {
3974
+ "name": "tickets_key_unique",
3975
+ "nullsNotDistinct": false,
3976
+ "columns": [
3977
+ "key"
3978
+ ]
3979
+ },
3980
+ "ticket_project_number": {
3981
+ "name": "ticket_project_number",
3982
+ "nullsNotDistinct": false,
3983
+ "columns": [
3984
+ "project_id",
3985
+ "number"
3986
+ ]
3987
+ }
3988
+ },
3989
+ "policies": {},
3990
+ "checkConstraints": {},
3991
+ "isRLSEnabled": false
3992
+ },
3993
+ "public.saved_views": {
3994
+ "name": "saved_views",
3995
+ "schema": "",
3996
+ "columns": {
3997
+ "id": {
3998
+ "name": "id",
3999
+ "type": "uuid",
4000
+ "primaryKey": true,
4001
+ "notNull": true,
4002
+ "default": "gen_random_uuid()"
4003
+ },
4004
+ "project_id": {
4005
+ "name": "project_id",
4006
+ "type": "uuid",
4007
+ "primaryKey": false,
4008
+ "notNull": true
4009
+ },
4010
+ "user_id": {
4011
+ "name": "user_id",
4012
+ "type": "text",
4013
+ "primaryKey": false,
4014
+ "notNull": true
4015
+ },
4016
+ "name": {
4017
+ "name": "name",
4018
+ "type": "text",
4019
+ "primaryKey": false,
4020
+ "notNull": true
4021
+ },
4022
+ "filters": {
4023
+ "name": "filters",
4024
+ "type": "jsonb",
4025
+ "primaryKey": false,
4026
+ "notNull": true
4027
+ }
4028
+ },
4029
+ "indexes": {},
4030
+ "foreignKeys": {
4031
+ "saved_views_project_id_projects_id_fk": {
4032
+ "name": "saved_views_project_id_projects_id_fk",
4033
+ "tableFrom": "saved_views",
4034
+ "tableTo": "projects",
4035
+ "columnsFrom": [
4036
+ "project_id"
4037
+ ],
4038
+ "columnsTo": [
4039
+ "id"
4040
+ ],
4041
+ "onDelete": "cascade",
4042
+ "onUpdate": "no action"
4043
+ },
4044
+ "saved_views_user_id_user_id_fk": {
4045
+ "name": "saved_views_user_id_user_id_fk",
4046
+ "tableFrom": "saved_views",
4047
+ "tableTo": "user",
4048
+ "columnsFrom": [
4049
+ "user_id"
4050
+ ],
4051
+ "columnsTo": [
4052
+ "id"
4053
+ ],
4054
+ "onDelete": "cascade",
4055
+ "onUpdate": "no action"
4056
+ }
4057
+ },
4058
+ "compositePrimaryKeys": {},
4059
+ "uniqueConstraints": {},
4060
+ "policies": {},
4061
+ "checkConstraints": {},
4062
+ "isRLSEnabled": false
4063
+ },
4064
+ "public.workspace_members": {
4065
+ "name": "workspace_members",
4066
+ "schema": "",
4067
+ "columns": {
4068
+ "workspace_id": {
4069
+ "name": "workspace_id",
4070
+ "type": "uuid",
4071
+ "primaryKey": false,
4072
+ "notNull": true
4073
+ },
4074
+ "user_id": {
4075
+ "name": "user_id",
4076
+ "type": "text",
4077
+ "primaryKey": false,
4078
+ "notNull": true
4079
+ },
4080
+ "role": {
4081
+ "name": "role",
4082
+ "type": "text",
4083
+ "primaryKey": false,
4084
+ "notNull": true
4085
+ }
4086
+ },
4087
+ "indexes": {
4088
+ "workspace_member_user": {
4089
+ "name": "workspace_member_user",
4090
+ "columns": [
4091
+ {
4092
+ "expression": "user_id",
4093
+ "isExpression": false,
4094
+ "asc": true,
4095
+ "nulls": "last"
4096
+ }
4097
+ ],
4098
+ "isUnique": false,
4099
+ "concurrently": false,
4100
+ "method": "btree",
4101
+ "with": {}
4102
+ }
4103
+ },
4104
+ "foreignKeys": {
4105
+ "workspace_members_workspace_id_workspaces_id_fk": {
4106
+ "name": "workspace_members_workspace_id_workspaces_id_fk",
4107
+ "tableFrom": "workspace_members",
4108
+ "tableTo": "workspaces",
4109
+ "columnsFrom": [
4110
+ "workspace_id"
4111
+ ],
4112
+ "columnsTo": [
4113
+ "id"
4114
+ ],
4115
+ "onDelete": "cascade",
4116
+ "onUpdate": "no action"
4117
+ },
4118
+ "workspace_members_user_id_user_id_fk": {
4119
+ "name": "workspace_members_user_id_user_id_fk",
4120
+ "tableFrom": "workspace_members",
4121
+ "tableTo": "user",
4122
+ "columnsFrom": [
4123
+ "user_id"
4124
+ ],
4125
+ "columnsTo": [
4126
+ "id"
4127
+ ],
4128
+ "onDelete": "cascade",
4129
+ "onUpdate": "no action"
4130
+ }
4131
+ },
4132
+ "compositePrimaryKeys": {
4133
+ "workspace_members_workspace_id_user_id_pk": {
4134
+ "name": "workspace_members_workspace_id_user_id_pk",
4135
+ "columns": [
4136
+ "workspace_id",
4137
+ "user_id"
4138
+ ]
4139
+ }
4140
+ },
4141
+ "uniqueConstraints": {},
4142
+ "policies": {},
4143
+ "checkConstraints": {},
4144
+ "isRLSEnabled": false
4145
+ },
4146
+ "public.workspaces": {
4147
+ "name": "workspaces",
4148
+ "schema": "",
4149
+ "columns": {
4150
+ "id": {
4151
+ "name": "id",
4152
+ "type": "uuid",
4153
+ "primaryKey": true,
4154
+ "notNull": true,
4155
+ "default": "gen_random_uuid()"
4156
+ },
4157
+ "slug": {
4158
+ "name": "slug",
4159
+ "type": "text",
4160
+ "primaryKey": false,
4161
+ "notNull": true
4162
+ },
4163
+ "name": {
4164
+ "name": "name",
4165
+ "type": "text",
4166
+ "primaryKey": false,
4167
+ "notNull": true
4168
+ },
4169
+ "description": {
4170
+ "name": "description",
4171
+ "type": "text",
4172
+ "primaryKey": false,
4173
+ "notNull": true,
4174
+ "default": "''"
4175
+ },
4176
+ "version": {
4177
+ "name": "version",
4178
+ "type": "integer",
4179
+ "primaryKey": false,
4180
+ "notNull": true,
4181
+ "default": 1
4182
+ },
4183
+ "created_at": {
4184
+ "name": "created_at",
4185
+ "type": "timestamp with time zone",
4186
+ "primaryKey": false,
4187
+ "notNull": true,
4188
+ "default": "now()"
4189
+ },
4190
+ "updated_at": {
4191
+ "name": "updated_at",
4192
+ "type": "timestamp with time zone",
4193
+ "primaryKey": false,
4194
+ "notNull": true,
4195
+ "default": "now()"
4196
+ }
4197
+ },
4198
+ "indexes": {},
4199
+ "foreignKeys": {},
4200
+ "compositePrimaryKeys": {},
4201
+ "uniqueConstraints": {
4202
+ "workspaces_slug_unique": {
4203
+ "name": "workspaces_slug_unique",
4204
+ "nullsNotDistinct": false,
4205
+ "columns": [
4206
+ "slug"
4207
+ ]
4208
+ }
4209
+ },
4210
+ "policies": {},
4211
+ "checkConstraints": {},
4212
+ "isRLSEnabled": false
4213
+ }
4214
+ },
4215
+ "enums": {},
4216
+ "schemas": {},
4217
+ "sequences": {},
4218
+ "roles": {},
4219
+ "policies": {},
4220
+ "views": {},
4221
+ "_meta": {
4222
+ "columns": {},
4223
+ "schemas": {},
4224
+ "tables": {}
4225
+ }
4226
+ }