create-m5kdev 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/package.json +1 -1
  2. package/templates/minimal-app/.cursor/rules/frontend-component-guide.mdc +95 -95
  3. package/templates/minimal-app/.cursor/rules/frontend-data-guide.mdc +103 -103
  4. package/templates/minimal-app/.cursor/rules/frontend-form-guide.mdc +80 -80
  5. package/templates/minimal-app/.cursor/rules/frontend-hook-guide.mdc +79 -79
  6. package/templates/minimal-app/.cursor/rules/frontend-i18n-guide.mdc +45 -45
  7. package/templates/minimal-app/.cursor/rules/module-dto-guide.mdc +60 -60
  8. package/templates/minimal-app/.cursor/rules/module-prompt-guide.mdc +214 -214
  9. package/templates/minimal-app/.cursor/rules/module-repository-guide.mdc +167 -167
  10. package/templates/minimal-app/.cursor/rules/module-schema-guide.mdc +53 -53
  11. package/templates/minimal-app/.cursor/rules/module-service-guide.mdc +367 -367
  12. package/templates/minimal-app/.cursor/rules/module-trpc-guide.mdc +71 -71
  13. package/templates/minimal-app/.github/workflows/check.yml.tpl +21 -0
  14. package/templates/minimal-app/AGENTS.md.tpl +22 -31
  15. package/templates/minimal-app/CLAUDE.md.tpl +17 -3
  16. package/templates/minimal-app/GLOSSARY.md.tpl +181 -0
  17. package/templates/minimal-app/README.md.tpl +14 -6
  18. package/templates/minimal-app/apps/.gitignore.tpl +13 -13
  19. package/templates/minimal-app/apps/e2e/package.json.tpl +23 -23
  20. package/templates/minimal-app/apps/e2e/servers.ts.tpl +22 -6
  21. package/templates/minimal-app/apps/email/package.json.tpl +34 -34
  22. package/templates/minimal-app/apps/expo/.gitignore.tpl +44 -44
  23. package/templates/minimal-app/apps/expo/.prettierignore +13 -13
  24. package/templates/minimal-app/apps/expo/.prettierrc.json.tpl +9 -9
  25. package/templates/minimal-app/apps/expo/CHANGELOG.md.tpl +156 -156
  26. package/templates/minimal-app/apps/expo/README.md.tpl +44 -44
  27. package/templates/minimal-app/apps/expo/expo-env.d.ts.tpl +3 -0
  28. package/templates/minimal-app/apps/expo/package.json.tpl +63 -63
  29. package/templates/minimal-app/apps/expo/uniwind-types.d.ts.tpl +10 -0
  30. package/templates/minimal-app/apps/landing/package.json.tpl +34 -34
  31. package/templates/minimal-app/apps/server/AGENTS.md.tpl +1 -1
  32. package/templates/minimal-app/apps/server/drizzle/0000_whole_echo.sql +366 -366
  33. package/templates/minimal-app/apps/server/drizzle/0002_crazy_lilith.sql +46 -46
  34. package/templates/minimal-app/apps/server/drizzle/0003_freezing_fantastic_four.sql +3 -3
  35. package/templates/minimal-app/apps/server/drizzle/0004_slow_ezekiel_stane.sql +98 -98
  36. package/templates/minimal-app/apps/server/drizzle/0005_wonderful_the_professor.sql +1 -1
  37. package/templates/minimal-app/apps/server/drizzle/0006_lazy_blue_marvel.sql +158 -158
  38. package/templates/minimal-app/apps/server/drizzle/0007_abnormal_ultimo.sql +1 -1
  39. package/templates/minimal-app/apps/server/drizzle/0008_steady_nekra.sql +86 -86
  40. package/templates/minimal-app/apps/server/drizzle/meta/0000_snapshot.json.tpl +2624 -2624
  41. package/templates/minimal-app/apps/server/drizzle/meta/0001_snapshot.json.tpl +2670 -2670
  42. package/templates/minimal-app/apps/server/drizzle/meta/0002_snapshot.json.tpl +2715 -2715
  43. package/templates/minimal-app/apps/server/drizzle/meta/0003_snapshot.json.tpl +2687 -2687
  44. package/templates/minimal-app/apps/server/drizzle/meta/0004_snapshot.json.tpl +2497 -2497
  45. package/templates/minimal-app/apps/server/drizzle/meta/0005_snapshot.json.tpl +2483 -2483
  46. package/templates/minimal-app/apps/server/drizzle/meta/0006_snapshot.json.tpl +3602 -3602
  47. package/templates/minimal-app/apps/server/drizzle/meta/0007_snapshot.json.tpl +3619 -3619
  48. package/templates/minimal-app/apps/server/drizzle/meta/0008_snapshot.json.tpl +3619 -3619
  49. package/templates/minimal-app/apps/server/drizzle/meta/_journal.json.tpl +76 -76
  50. package/templates/minimal-app/apps/server/drizzle-postgresql/0000_glorious_warhawk.sql +522 -0
  51. package/templates/minimal-app/apps/server/drizzle-postgresql/meta/0000_snapshot.json.tpl +3555 -0
  52. package/templates/minimal-app/apps/server/drizzle-postgresql/meta/_journal.json.tpl +13 -0
  53. package/templates/minimal-app/apps/server/drizzle.config.ts.tpl +1 -1
  54. package/templates/minimal-app/apps/server/mastra.ts.tpl +42 -0
  55. package/templates/minimal-app/apps/server/package.json.tpl +9 -4
  56. package/templates/minimal-app/apps/server/src/app.ts.tpl +21 -16
  57. package/templates/minimal-app/apps/server/src/drizzle.schema.ts.tpl +2 -0
  58. package/templates/minimal-app/apps/server/src/modules/conversation/conversation.mastra.ts.tpl +48 -0
  59. package/templates/minimal-app/apps/server/src/modules/conversation/conversation.persistence.ts.tpl +47 -0
  60. package/templates/minimal-app/apps/server/src/modules/posts/posts.db.ts.tpl +7 -6
  61. package/templates/minimal-app/apps/server/src/modules/posts/posts.repository.ts.tpl +2 -2
  62. package/templates/minimal-app/apps/shared/.env.example.tpl +6 -3
  63. package/templates/minimal-app/apps/shared/.env.production.example.tpl +7 -2
  64. package/templates/minimal-app/apps/shared/.env.tpl +6 -3
  65. package/templates/minimal-app/apps/shared/Dockerfile.pgbouncer +6 -0
  66. package/templates/minimal-app/apps/shared/compose.yaml.tpl +27 -0
  67. package/templates/minimal-app/apps/shared/fly.toml.tpl +0 -4
  68. package/templates/minimal-app/apps/shared/package.json.tpl +27 -27
  69. package/templates/minimal-app/apps/shared/pgbouncer.ini +13 -0
  70. package/templates/minimal-app/apps/shared/pgbouncer.users +1 -0
  71. package/templates/minimal-app/apps/webapp/AGENTS.md.tpl +24 -24
  72. package/templates/minimal-app/apps/webapp/index.html.tpl +22 -22
  73. package/templates/minimal-app/apps/webapp/package.json.tpl +53 -53
  74. package/templates/minimal-app/apps/webapp/public/logo.svg.tpl +6 -6
  75. package/templates/minimal-app/apps/webapp/translations/en/{{APP_SLUG}}.json.tpl +1 -1
  76. package/templates/minimal-app/biome.json.tpl +1 -0
  77. package/templates/minimal-app/docs/adr/.gitkeep +0 -0
  78. package/templates/minimal-app/docs/agents/domain.md.tpl +38 -0
  79. package/templates/minimal-app/docs/agents/issue-tracker.md.tpl +45 -0
  80. package/templates/minimal-app/docs/agents/triage-labels.md.tpl +15 -0
  81. package/templates/minimal-app/package.json.tpl +5 -0
  82. package/templates/minimal-app/pnpm-workspace.yaml.tpl +16 -13
  83. package/templates/minimal-app/template.manifest.json +21 -0
@@ -1,2484 +1,2484 @@
1
- {
2
- "version": "6",
3
- "dialect": "sqlite",
4
- "id": "a46291f0-75cc-40ae-a97d-e2f9bf558763",
5
- "prevId": "4debd6f2-0866-4e12-a1bf-844285823693",
6
- "tables": {
7
- "account_claim_magic_links": {
8
- "name": "account_claim_magic_links",
9
- "columns": {
10
- "id": {
11
- "name": "id",
12
- "type": "text",
13
- "primaryKey": true,
14
- "notNull": true,
15
- "autoincrement": false
16
- },
17
- "claim_id": {
18
- "name": "claim_id",
19
- "type": "text",
20
- "primaryKey": false,
21
- "notNull": true,
22
- "autoincrement": false
23
- },
24
- "user_id": {
25
- "name": "user_id",
26
- "type": "text",
27
- "primaryKey": false,
28
- "notNull": true,
29
- "autoincrement": false
30
- },
31
- "email": {
32
- "name": "email",
33
- "type": "text",
34
- "primaryKey": false,
35
- "notNull": true,
36
- "autoincrement": false
37
- },
38
- "token": {
39
- "name": "token",
40
- "type": "text",
41
- "primaryKey": false,
42
- "notNull": true,
43
- "autoincrement": false
44
- },
45
- "url": {
46
- "name": "url",
47
- "type": "text",
48
- "primaryKey": false,
49
- "notNull": true,
50
- "autoincrement": false
51
- },
52
- "expires_at": {
53
- "name": "expires_at",
54
- "type": "integer",
55
- "primaryKey": false,
56
- "notNull": false,
57
- "autoincrement": false
58
- },
59
- "created_at": {
60
- "name": "created_at",
61
- "type": "integer",
62
- "primaryKey": false,
63
- "notNull": true,
64
- "autoincrement": false
65
- }
66
- },
67
- "indexes": {},
68
- "foreignKeys": {
69
- "account_claim_magic_links_claim_id_account_claims_id_fk": {
70
- "name": "account_claim_magic_links_claim_id_account_claims_id_fk",
71
- "tableFrom": "account_claim_magic_links",
72
- "tableTo": "account_claims",
73
- "columnsFrom": [
74
- "claim_id"
75
- ],
76
- "columnsTo": [
77
- "id"
78
- ],
79
- "onDelete": "cascade",
80
- "onUpdate": "no action"
81
- },
82
- "account_claim_magic_links_user_id_users_id_fk": {
83
- "name": "account_claim_magic_links_user_id_users_id_fk",
84
- "tableFrom": "account_claim_magic_links",
85
- "tableTo": "users",
86
- "columnsFrom": [
87
- "user_id"
88
- ],
89
- "columnsTo": [
90
- "id"
91
- ],
92
- "onDelete": "cascade",
93
- "onUpdate": "no action"
94
- }
95
- },
96
- "compositePrimaryKeys": {},
97
- "uniqueConstraints": {},
98
- "checkConstraints": {}
99
- },
100
- "account_claims": {
101
- "name": "account_claims",
102
- "columns": {
103
- "id": {
104
- "name": "id",
105
- "type": "text",
106
- "primaryKey": true,
107
- "notNull": true,
108
- "autoincrement": false
109
- },
110
- "claim_user_id": {
111
- "name": "claim_user_id",
112
- "type": "text",
113
- "primaryKey": false,
114
- "notNull": true,
115
- "autoincrement": false
116
- },
117
- "status": {
118
- "name": "status",
119
- "type": "text",
120
- "primaryKey": false,
121
- "notNull": true,
122
- "autoincrement": false
123
- },
124
- "code": {
125
- "name": "code",
126
- "type": "text",
127
- "primaryKey": false,
128
- "notNull": false,
129
- "autoincrement": false
130
- },
131
- "expires_at": {
132
- "name": "expires_at",
133
- "type": "integer",
134
- "primaryKey": false,
135
- "notNull": false,
136
- "autoincrement": false
137
- },
138
- "claimed_at": {
139
- "name": "claimed_at",
140
- "type": "integer",
141
- "primaryKey": false,
142
- "notNull": false,
143
- "autoincrement": false
144
- },
145
- "claimed_email": {
146
- "name": "claimed_email",
147
- "type": "text",
148
- "primaryKey": false,
149
- "notNull": false,
150
- "autoincrement": false
151
- },
152
- "created_at": {
153
- "name": "created_at",
154
- "type": "integer",
155
- "primaryKey": false,
156
- "notNull": true,
157
- "autoincrement": false
158
- },
159
- "updated_at": {
160
- "name": "updated_at",
161
- "type": "integer",
162
- "primaryKey": false,
163
- "notNull": false,
164
- "autoincrement": false
165
- }
166
- },
167
- "indexes": {},
168
- "foreignKeys": {
169
- "account_claims_claim_user_id_users_id_fk": {
170
- "name": "account_claims_claim_user_id_users_id_fk",
171
- "tableFrom": "account_claims",
172
- "tableTo": "users",
173
- "columnsFrom": [
174
- "claim_user_id"
175
- ],
176
- "columnsTo": [
177
- "id"
178
- ],
179
- "onDelete": "no action",
180
- "onUpdate": "no action"
181
- }
182
- },
183
- "compositePrimaryKeys": {},
184
- "uniqueConstraints": {},
185
- "checkConstraints": {}
186
- },
187
- "accounts": {
188
- "name": "accounts",
189
- "columns": {
190
- "id": {
191
- "name": "id",
192
- "type": "text",
193
- "primaryKey": true,
194
- "notNull": true,
195
- "autoincrement": false
196
- },
197
- "account_id": {
198
- "name": "account_id",
199
- "type": "text",
200
- "primaryKey": false,
201
- "notNull": true,
202
- "autoincrement": false
203
- },
204
- "provider_id": {
205
- "name": "provider_id",
206
- "type": "text",
207
- "primaryKey": false,
208
- "notNull": true,
209
- "autoincrement": false
210
- },
211
- "user_id": {
212
- "name": "user_id",
213
- "type": "text",
214
- "primaryKey": false,
215
- "notNull": true,
216
- "autoincrement": false
217
- },
218
- "access_token": {
219
- "name": "access_token",
220
- "type": "text",
221
- "primaryKey": false,
222
- "notNull": false,
223
- "autoincrement": false
224
- },
225
- "refresh_token": {
226
- "name": "refresh_token",
227
- "type": "text",
228
- "primaryKey": false,
229
- "notNull": false,
230
- "autoincrement": false
231
- },
232
- "id_token": {
233
- "name": "id_token",
234
- "type": "text",
235
- "primaryKey": false,
236
- "notNull": false,
237
- "autoincrement": false
238
- },
239
- "access_token_expires_at": {
240
- "name": "access_token_expires_at",
241
- "type": "integer",
242
- "primaryKey": false,
243
- "notNull": false,
244
- "autoincrement": false
245
- },
246
- "refresh_token_expires_at": {
247
- "name": "refresh_token_expires_at",
248
- "type": "integer",
249
- "primaryKey": false,
250
- "notNull": false,
251
- "autoincrement": false
252
- },
253
- "scope": {
254
- "name": "scope",
255
- "type": "text",
256
- "primaryKey": false,
257
- "notNull": false,
258
- "autoincrement": false
259
- },
260
- "password": {
261
- "name": "password",
262
- "type": "text",
263
- "primaryKey": false,
264
- "notNull": false,
265
- "autoincrement": false
266
- },
267
- "created_at": {
268
- "name": "created_at",
269
- "type": "integer",
270
- "primaryKey": false,
271
- "notNull": true,
272
- "autoincrement": false
273
- },
274
- "updated_at": {
275
- "name": "updated_at",
276
- "type": "integer",
277
- "primaryKey": false,
278
- "notNull": true,
279
- "autoincrement": false
280
- }
281
- },
282
- "indexes": {},
283
- "foreignKeys": {
284
- "accounts_user_id_users_id_fk": {
285
- "name": "accounts_user_id_users_id_fk",
286
- "tableFrom": "accounts",
287
- "tableTo": "users",
288
- "columnsFrom": [
289
- "user_id"
290
- ],
291
- "columnsTo": [
292
- "id"
293
- ],
294
- "onDelete": "cascade",
295
- "onUpdate": "no action"
296
- }
297
- },
298
- "compositePrimaryKeys": {},
299
- "uniqueConstraints": {},
300
- "checkConstraints": {}
301
- },
302
- "ai_usage": {
303
- "name": "ai_usage",
304
- "columns": {
305
- "id": {
306
- "name": "id",
307
- "type": "text",
308
- "primaryKey": true,
309
- "notNull": true,
310
- "autoincrement": false
311
- },
312
- "user_id": {
313
- "name": "user_id",
314
- "type": "text",
315
- "primaryKey": false,
316
- "notNull": false,
317
- "autoincrement": false
318
- },
319
- "member_id": {
320
- "name": "member_id",
321
- "type": "text",
322
- "primaryKey": false,
323
- "notNull": false,
324
- "autoincrement": false
325
- },
326
- "team_id": {
327
- "name": "team_id",
328
- "type": "text",
329
- "primaryKey": false,
330
- "notNull": false,
331
- "autoincrement": false
332
- },
333
- "organization_id": {
334
- "name": "organization_id",
335
- "type": "text",
336
- "primaryKey": false,
337
- "notNull": false,
338
- "autoincrement": false
339
- },
340
- "feature": {
341
- "name": "feature",
342
- "type": "text",
343
- "primaryKey": false,
344
- "notNull": true,
345
- "autoincrement": false
346
- },
347
- "provider": {
348
- "name": "provider",
349
- "type": "text",
350
- "primaryKey": false,
351
- "notNull": true,
352
- "autoincrement": false
353
- },
354
- "model": {
355
- "name": "model",
356
- "type": "text",
357
- "primaryKey": false,
358
- "notNull": true,
359
- "autoincrement": false
360
- },
361
- "input_tokens": {
362
- "name": "input_tokens",
363
- "type": "integer",
364
- "primaryKey": false,
365
- "notNull": false,
366
- "autoincrement": false
367
- },
368
- "output_tokens": {
369
- "name": "output_tokens",
370
- "type": "integer",
371
- "primaryKey": false,
372
- "notNull": false,
373
- "autoincrement": false
374
- },
375
- "total_tokens": {
376
- "name": "total_tokens",
377
- "type": "integer",
378
- "primaryKey": false,
379
- "notNull": false,
380
- "autoincrement": false
381
- },
382
- "cost": {
383
- "name": "cost",
384
- "type": "real",
385
- "primaryKey": false,
386
- "notNull": false,
387
- "autoincrement": false
388
- },
389
- "trace_id": {
390
- "name": "trace_id",
391
- "type": "text",
392
- "primaryKey": false,
393
- "notNull": false,
394
- "autoincrement": false
395
- },
396
- "created_at": {
397
- "name": "created_at",
398
- "type": "integer",
399
- "primaryKey": false,
400
- "notNull": true,
401
- "autoincrement": false
402
- },
403
- "metadata": {
404
- "name": "metadata",
405
- "type": "text",
406
- "primaryKey": false,
407
- "notNull": false,
408
- "autoincrement": false
409
- }
410
- },
411
- "indexes": {},
412
- "foreignKeys": {
413
- "ai_usage_user_id_users_id_fk": {
414
- "name": "ai_usage_user_id_users_id_fk",
415
- "tableFrom": "ai_usage",
416
- "tableTo": "users",
417
- "columnsFrom": [
418
- "user_id"
419
- ],
420
- "columnsTo": [
421
- "id"
422
- ],
423
- "onDelete": "set null",
424
- "onUpdate": "no action"
425
- },
426
- "ai_usage_member_id_members_id_fk": {
427
- "name": "ai_usage_member_id_members_id_fk",
428
- "tableFrom": "ai_usage",
429
- "tableTo": "members",
430
- "columnsFrom": [
431
- "member_id"
432
- ],
433
- "columnsTo": [
434
- "id"
435
- ],
436
- "onDelete": "set null",
437
- "onUpdate": "no action"
438
- },
439
- "ai_usage_organization_id_organizations_id_fk": {
440
- "name": "ai_usage_organization_id_organizations_id_fk",
441
- "tableFrom": "ai_usage",
442
- "tableTo": "organizations",
443
- "columnsFrom": [
444
- "organization_id"
445
- ],
446
- "columnsTo": [
447
- "id"
448
- ],
449
- "onDelete": "set null",
450
- "onUpdate": "no action"
451
- }
452
- },
453
- "compositePrimaryKeys": {},
454
- "uniqueConstraints": {},
455
- "checkConstraints": {}
456
- },
457
- "apikeys": {
458
- "name": "apikeys",
459
- "columns": {
460
- "id": {
461
- "name": "id",
462
- "type": "text",
463
- "primaryKey": true,
464
- "notNull": true,
465
- "autoincrement": false
466
- },
467
- "name": {
468
- "name": "name",
469
- "type": "text",
470
- "primaryKey": false,
471
- "notNull": false,
472
- "autoincrement": false
473
- },
474
- "start": {
475
- "name": "start",
476
- "type": "text",
477
- "primaryKey": false,
478
- "notNull": false,
479
- "autoincrement": false
480
- },
481
- "prefix": {
482
- "name": "prefix",
483
- "type": "text",
484
- "primaryKey": false,
485
- "notNull": false,
486
- "autoincrement": false
487
- },
488
- "key": {
489
- "name": "key",
490
- "type": "text",
491
- "primaryKey": false,
492
- "notNull": true,
493
- "autoincrement": false
494
- },
495
- "user_id": {
496
- "name": "user_id",
497
- "type": "text",
498
- "primaryKey": false,
499
- "notNull": true,
500
- "autoincrement": false
501
- },
502
- "refill_interval": {
503
- "name": "refill_interval",
504
- "type": "integer",
505
- "primaryKey": false,
506
- "notNull": false,
507
- "autoincrement": false
508
- },
509
- "refill_amount": {
510
- "name": "refill_amount",
511
- "type": "integer",
512
- "primaryKey": false,
513
- "notNull": false,
514
- "autoincrement": false
515
- },
516
- "last_refill_at": {
517
- "name": "last_refill_at",
518
- "type": "integer",
519
- "primaryKey": false,
520
- "notNull": false,
521
- "autoincrement": false
522
- },
523
- "enabled": {
524
- "name": "enabled",
525
- "type": "integer",
526
- "primaryKey": false,
527
- "notNull": true,
528
- "autoincrement": false
529
- },
530
- "rate_limit_enabled": {
531
- "name": "rate_limit_enabled",
532
- "type": "integer",
533
- "primaryKey": false,
534
- "notNull": true,
535
- "autoincrement": false
536
- },
537
- "rate_limit_time_window": {
538
- "name": "rate_limit_time_window",
539
- "type": "integer",
540
- "primaryKey": false,
541
- "notNull": false,
542
- "autoincrement": false
543
- },
544
- "rate_limit_max": {
545
- "name": "rate_limit_max",
546
- "type": "integer",
547
- "primaryKey": false,
548
- "notNull": false,
549
- "autoincrement": false
550
- },
551
- "request_count": {
552
- "name": "request_count",
553
- "type": "integer",
554
- "primaryKey": false,
555
- "notNull": true,
556
- "autoincrement": false
557
- },
558
- "remaining": {
559
- "name": "remaining",
560
- "type": "integer",
561
- "primaryKey": false,
562
- "notNull": false,
563
- "autoincrement": false
564
- },
565
- "last_request": {
566
- "name": "last_request",
567
- "type": "integer",
568
- "primaryKey": false,
569
- "notNull": false,
570
- "autoincrement": false
571
- },
572
- "expires_at": {
573
- "name": "expires_at",
574
- "type": "integer",
575
- "primaryKey": false,
576
- "notNull": false,
577
- "autoincrement": false
578
- },
579
- "created_at": {
580
- "name": "created_at",
581
- "type": "integer",
582
- "primaryKey": false,
583
- "notNull": true,
584
- "autoincrement": false
585
- },
586
- "updated_at": {
587
- "name": "updated_at",
588
- "type": "integer",
589
- "primaryKey": false,
590
- "notNull": true,
591
- "autoincrement": false
592
- },
593
- "permissions": {
594
- "name": "permissions",
595
- "type": "text",
596
- "primaryKey": false,
597
- "notNull": false,
598
- "autoincrement": false
599
- },
600
- "metadata": {
601
- "name": "metadata",
602
- "type": "text",
603
- "primaryKey": false,
604
- "notNull": false,
605
- "autoincrement": false
606
- }
607
- },
608
- "indexes": {},
609
- "foreignKeys": {
610
- "apikeys_user_id_users_id_fk": {
611
- "name": "apikeys_user_id_users_id_fk",
612
- "tableFrom": "apikeys",
613
- "tableTo": "users",
614
- "columnsFrom": [
615
- "user_id"
616
- ],
617
- "columnsTo": [
618
- "id"
619
- ],
620
- "onDelete": "no action",
621
- "onUpdate": "no action"
622
- }
623
- },
624
- "compositePrimaryKeys": {},
625
- "uniqueConstraints": {},
626
- "checkConstraints": {}
627
- },
628
- "chats": {
629
- "name": "chats",
630
- "columns": {
631
- "id": {
632
- "name": "id",
633
- "type": "text",
634
- "primaryKey": true,
635
- "notNull": true,
636
- "autoincrement": false
637
- },
638
- "user_id": {
639
- "name": "user_id",
640
- "type": "text",
641
- "primaryKey": false,
642
- "notNull": true,
643
- "autoincrement": false
644
- },
645
- "title": {
646
- "name": "title",
647
- "type": "text",
648
- "primaryKey": false,
649
- "notNull": false,
650
- "autoincrement": false
651
- },
652
- "type": {
653
- "name": "type",
654
- "type": "text",
655
- "primaryKey": false,
656
- "notNull": false,
657
- "autoincrement": false
658
- },
659
- "conversation": {
660
- "name": "conversation",
661
- "type": "text",
662
- "primaryKey": false,
663
- "notNull": false,
664
- "autoincrement": false
665
- },
666
- "created_at": {
667
- "name": "created_at",
668
- "type": "integer",
669
- "primaryKey": false,
670
- "notNull": false,
671
- "autoincrement": false
672
- },
673
- "updated_at": {
674
- "name": "updated_at",
675
- "type": "integer",
676
- "primaryKey": false,
677
- "notNull": true,
678
- "autoincrement": false
679
- }
680
- },
681
- "indexes": {},
682
- "foreignKeys": {
683
- "chats_user_id_users_id_fk": {
684
- "name": "chats_user_id_users_id_fk",
685
- "tableFrom": "chats",
686
- "tableTo": "users",
687
- "columnsFrom": [
688
- "user_id"
689
- ],
690
- "columnsTo": [
691
- "id"
692
- ],
693
- "onDelete": "cascade",
694
- "onUpdate": "no action"
695
- }
696
- },
697
- "compositePrimaryKeys": {},
698
- "uniqueConstraints": {},
699
- "checkConstraints": {}
700
- },
701
- "files": {
702
- "name": "files",
703
- "columns": {
704
- "id": {
705
- "name": "id",
706
- "type": "text",
707
- "primaryKey": true,
708
- "notNull": true,
709
- "autoincrement": false
710
- },
711
- "created_at": {
712
- "name": "created_at",
713
- "type": "integer",
714
- "primaryKey": false,
715
- "notNull": true,
716
- "autoincrement": false
717
- },
718
- "updated_at": {
719
- "name": "updated_at",
720
- "type": "integer",
721
- "primaryKey": false,
722
- "notNull": false,
723
- "autoincrement": false
724
- },
725
- "deleted_at": {
726
- "name": "deleted_at",
727
- "type": "integer",
728
- "primaryKey": false,
729
- "notNull": false,
730
- "autoincrement": false
731
- },
732
- "user_id": {
733
- "name": "user_id",
734
- "type": "text",
735
- "primaryKey": false,
736
- "notNull": false,
737
- "autoincrement": false
738
- },
739
- "member_id": {
740
- "name": "member_id",
741
- "type": "text",
742
- "primaryKey": false,
743
- "notNull": false,
744
- "autoincrement": false
745
- },
746
- "organization_id": {
747
- "name": "organization_id",
748
- "type": "text",
749
- "primaryKey": false,
750
- "notNull": false,
751
- "autoincrement": false
752
- },
753
- "team_id": {
754
- "name": "team_id",
755
- "type": "text",
756
- "primaryKey": false,
757
- "notNull": false,
758
- "autoincrement": false
759
- },
760
- "bucket": {
761
- "name": "bucket",
762
- "type": "text",
763
- "primaryKey": false,
764
- "notNull": true,
765
- "autoincrement": false
766
- },
767
- "key": {
768
- "name": "key",
769
- "type": "text",
770
- "primaryKey": false,
771
- "notNull": true,
772
- "autoincrement": false
773
- },
774
- "original_name": {
775
- "name": "original_name",
776
- "type": "text",
777
- "primaryKey": false,
778
- "notNull": true,
779
- "autoincrement": false
780
- },
781
- "original_extension": {
782
- "name": "original_extension",
783
- "type": "text",
784
- "primaryKey": false,
785
- "notNull": false,
786
- "autoincrement": false
787
- },
788
- "content_type": {
789
- "name": "content_type",
790
- "type": "text",
791
- "primaryKey": false,
792
- "notNull": true,
793
- "autoincrement": false
794
- },
795
- "size_bytes": {
796
- "name": "size_bytes",
797
- "type": "integer",
798
- "primaryKey": false,
799
- "notNull": false,
800
- "autoincrement": false
801
- },
802
- "etag": {
803
- "name": "etag",
804
- "type": "text",
805
- "primaryKey": false,
806
- "notNull": false,
807
- "autoincrement": false
808
- },
809
- "checksum_sha256": {
810
- "name": "checksum_sha256",
811
- "type": "text",
812
- "primaryKey": false,
813
- "notNull": false,
814
- "autoincrement": false
815
- },
816
- "metadata": {
817
- "name": "metadata",
818
- "type": "text",
819
- "primaryKey": false,
820
- "notNull": false,
821
- "autoincrement": false
822
- },
823
- "status": {
824
- "name": "status",
825
- "type": "text",
826
- "primaryKey": false,
827
- "notNull": true,
828
- "autoincrement": false
829
- },
830
- "uploaded_at": {
831
- "name": "uploaded_at",
832
- "type": "integer",
833
- "primaryKey": false,
834
- "notNull": false,
835
- "autoincrement": false
836
- }
837
- },
838
- "indexes": {
839
- "files_bucket_key_unique": {
840
- "name": "files_bucket_key_unique",
841
- "columns": [
842
- "bucket",
843
- "key"
844
- ],
845
- "isUnique": true
846
- }
847
- },
848
- "foreignKeys": {
849
- "files_user_id_users_id_fk": {
850
- "name": "files_user_id_users_id_fk",
851
- "tableFrom": "files",
852
- "tableTo": "users",
853
- "columnsFrom": [
854
- "user_id"
855
- ],
856
- "columnsTo": [
857
- "id"
858
- ],
859
- "onDelete": "set null",
860
- "onUpdate": "no action"
861
- },
862
- "files_member_id_members_id_fk": {
863
- "name": "files_member_id_members_id_fk",
864
- "tableFrom": "files",
865
- "tableTo": "members",
866
- "columnsFrom": [
867
- "member_id"
868
- ],
869
- "columnsTo": [
870
- "id"
871
- ],
872
- "onDelete": "set null",
873
- "onUpdate": "no action"
874
- },
875
- "files_organization_id_organizations_id_fk": {
876
- "name": "files_organization_id_organizations_id_fk",
877
- "tableFrom": "files",
878
- "tableTo": "organizations",
879
- "columnsFrom": [
880
- "organization_id"
881
- ],
882
- "columnsTo": [
883
- "id"
884
- ],
885
- "onDelete": "set null",
886
- "onUpdate": "no action"
887
- }
888
- },
889
- "compositePrimaryKeys": {},
890
- "uniqueConstraints": {},
891
- "checkConstraints": {}
892
- },
893
- "invitations": {
894
- "name": "invitations",
895
- "columns": {
896
- "id": {
897
- "name": "id",
898
- "type": "text",
899
- "primaryKey": true,
900
- "notNull": true,
901
- "autoincrement": false
902
- },
903
- "organization_id": {
904
- "name": "organization_id",
905
- "type": "text",
906
- "primaryKey": false,
907
- "notNull": true,
908
- "autoincrement": false
909
- },
910
- "member_id": {
911
- "name": "member_id",
912
- "type": "text",
913
- "primaryKey": false,
914
- "notNull": false,
915
- "autoincrement": false
916
- },
917
- "email": {
918
- "name": "email",
919
- "type": "text",
920
- "primaryKey": false,
921
- "notNull": true,
922
- "autoincrement": false
923
- },
924
- "role": {
925
- "name": "role",
926
- "type": "text",
927
- "primaryKey": false,
928
- "notNull": false,
929
- "autoincrement": false
930
- },
931
- "status": {
932
- "name": "status",
933
- "type": "text",
934
- "primaryKey": false,
935
- "notNull": true,
936
- "autoincrement": false
937
- },
938
- "created_at": {
939
- "name": "created_at",
940
- "type": "integer",
941
- "primaryKey": false,
942
- "notNull": true,
943
- "autoincrement": false
944
- },
945
- "expires_at": {
946
- "name": "expires_at",
947
- "type": "integer",
948
- "primaryKey": false,
949
- "notNull": true,
950
- "autoincrement": false
951
- },
952
- "inviter_id": {
953
- "name": "inviter_id",
954
- "type": "text",
955
- "primaryKey": false,
956
- "notNull": true,
957
- "autoincrement": false
958
- }
959
- },
960
- "indexes": {},
961
- "foreignKeys": {
962
- "invitations_organization_id_organizations_id_fk": {
963
- "name": "invitations_organization_id_organizations_id_fk",
964
- "tableFrom": "invitations",
965
- "tableTo": "organizations",
966
- "columnsFrom": [
967
- "organization_id"
968
- ],
969
- "columnsTo": [
970
- "id"
971
- ],
972
- "onDelete": "no action",
973
- "onUpdate": "no action"
974
- },
975
- "invitations_member_id_members_id_fk": {
976
- "name": "invitations_member_id_members_id_fk",
977
- "tableFrom": "invitations",
978
- "tableTo": "members",
979
- "columnsFrom": [
980
- "member_id"
981
- ],
982
- "columnsTo": [
983
- "id"
984
- ],
985
- "onDelete": "no action",
986
- "onUpdate": "no action"
987
- },
988
- "invitations_inviter_id_users_id_fk": {
989
- "name": "invitations_inviter_id_users_id_fk",
990
- "tableFrom": "invitations",
991
- "tableTo": "users",
992
- "columnsFrom": [
993
- "inviter_id"
994
- ],
995
- "columnsTo": [
996
- "id"
997
- ],
998
- "onDelete": "no action",
999
- "onUpdate": "no action"
1000
- }
1001
- },
1002
- "compositePrimaryKeys": {},
1003
- "uniqueConstraints": {},
1004
- "checkConstraints": {}
1005
- },
1006
- "members": {
1007
- "name": "members",
1008
- "columns": {
1009
- "id": {
1010
- "name": "id",
1011
- "type": "text",
1012
- "primaryKey": true,
1013
- "notNull": true,
1014
- "autoincrement": false
1015
- },
1016
- "organization_id": {
1017
- "name": "organization_id",
1018
- "type": "text",
1019
- "primaryKey": false,
1020
- "notNull": true,
1021
- "autoincrement": false
1022
- },
1023
- "user_id": {
1024
- "name": "user_id",
1025
- "type": "text",
1026
- "primaryKey": false,
1027
- "notNull": false,
1028
- "autoincrement": false
1029
- },
1030
- "email": {
1031
- "name": "email",
1032
- "type": "text",
1033
- "primaryKey": false,
1034
- "notNull": false,
1035
- "autoincrement": false
1036
- },
1037
- "name": {
1038
- "name": "name",
1039
- "type": "text",
1040
- "primaryKey": false,
1041
- "notNull": true,
1042
- "autoincrement": false,
1043
- "default": "''"
1044
- },
1045
- "image": {
1046
- "name": "image",
1047
- "type": "text",
1048
- "primaryKey": false,
1049
- "notNull": false,
1050
- "autoincrement": false
1051
- },
1052
- "role": {
1053
- "name": "role",
1054
- "type": "text",
1055
- "primaryKey": false,
1056
- "notNull": true,
1057
- "autoincrement": false
1058
- },
1059
- "created_at": {
1060
- "name": "created_at",
1061
- "type": "integer",
1062
- "primaryKey": false,
1063
- "notNull": true,
1064
- "autoincrement": false
1065
- },
1066
- "deleted_at": {
1067
- "name": "deleted_at",
1068
- "type": "integer",
1069
- "primaryKey": false,
1070
- "notNull": false,
1071
- "autoincrement": false
1072
- },
1073
- "preferences": {
1074
- "name": "preferences",
1075
- "type": "text",
1076
- "primaryKey": false,
1077
- "notNull": false,
1078
- "autoincrement": false,
1079
- "default": "'{}'"
1080
- },
1081
- "metadata": {
1082
- "name": "metadata",
1083
- "type": "text",
1084
- "primaryKey": false,
1085
- "notNull": false,
1086
- "autoincrement": false,
1087
- "default": "'{}'"
1088
- },
1089
- "onboarding": {
1090
- "name": "onboarding",
1091
- "type": "integer",
1092
- "primaryKey": false,
1093
- "notNull": false,
1094
- "autoincrement": false
1095
- },
1096
- "flags": {
1097
- "name": "flags",
1098
- "type": "text",
1099
- "primaryKey": false,
1100
- "notNull": false,
1101
- "autoincrement": false,
1102
- "default": "'[]'"
1103
- }
1104
- },
1105
- "indexes": {
1106
- "members_attached_user_organization_unique": {
1107
- "name": "members_attached_user_organization_unique",
1108
- "columns": [
1109
- "user_id",
1110
- "organization_id"
1111
- ],
1112
- "isUnique": true,
1113
- "where": "\"members\".\"user_id\" is not null"
1114
- },
1115
- "members_live_pending_email_organization_unique": {
1116
- "name": "members_live_pending_email_organization_unique",
1117
- "columns": [
1118
- "email",
1119
- "organization_id"
1120
- ],
1121
- "isUnique": true,
1122
- "where": "\"members\".\"user_id\" is null and \"members\".\"deleted_at\" is null"
1123
- }
1124
- },
1125
- "foreignKeys": {
1126
- "members_organization_id_organizations_id_fk": {
1127
- "name": "members_organization_id_organizations_id_fk",
1128
- "tableFrom": "members",
1129
- "tableTo": "organizations",
1130
- "columnsFrom": [
1131
- "organization_id"
1132
- ],
1133
- "columnsTo": [
1134
- "id"
1135
- ],
1136
- "onDelete": "no action",
1137
- "onUpdate": "no action"
1138
- },
1139
- "members_user_id_users_id_fk": {
1140
- "name": "members_user_id_users_id_fk",
1141
- "tableFrom": "members",
1142
- "tableTo": "users",
1143
- "columnsFrom": [
1144
- "user_id"
1145
- ],
1146
- "columnsTo": [
1147
- "id"
1148
- ],
1149
- "onDelete": "no action",
1150
- "onUpdate": "no action"
1151
- }
1152
- },
1153
- "compositePrimaryKeys": {},
1154
- "uniqueConstraints": {},
1155
- "checkConstraints": {}
1156
- },
1157
- "notification_devices": {
1158
- "name": "notification_devices",
1159
- "columns": {
1160
- "id": {
1161
- "name": "id",
1162
- "type": "text",
1163
- "primaryKey": true,
1164
- "notNull": true,
1165
- "autoincrement": false
1166
- },
1167
- "user_id": {
1168
- "name": "user_id",
1169
- "type": "text",
1170
- "primaryKey": false,
1171
- "notNull": true,
1172
- "autoincrement": false
1173
- },
1174
- "platform": {
1175
- "name": "platform",
1176
- "type": "text",
1177
- "primaryKey": false,
1178
- "notNull": true,
1179
- "autoincrement": false
1180
- },
1181
- "endpoint": {
1182
- "name": "endpoint",
1183
- "type": "text",
1184
- "primaryKey": false,
1185
- "notNull": false,
1186
- "autoincrement": false
1187
- },
1188
- "subscription": {
1189
- "name": "subscription",
1190
- "type": "text",
1191
- "primaryKey": false,
1192
- "notNull": false,
1193
- "autoincrement": false
1194
- },
1195
- "token": {
1196
- "name": "token",
1197
- "type": "text",
1198
- "primaryKey": false,
1199
- "notNull": false,
1200
- "autoincrement": false
1201
- },
1202
- "label": {
1203
- "name": "label",
1204
- "type": "text",
1205
- "primaryKey": false,
1206
- "notNull": false,
1207
- "autoincrement": false
1208
- },
1209
- "enabled": {
1210
- "name": "enabled",
1211
- "type": "integer",
1212
- "primaryKey": false,
1213
- "notNull": true,
1214
- "autoincrement": false,
1215
- "default": true
1216
- },
1217
- "created_at": {
1218
- "name": "created_at",
1219
- "type": "integer",
1220
- "primaryKey": false,
1221
- "notNull": true,
1222
- "autoincrement": false
1223
- },
1224
- "updated_at": {
1225
- "name": "updated_at",
1226
- "type": "integer",
1227
- "primaryKey": false,
1228
- "notNull": true,
1229
- "autoincrement": false
1230
- }
1231
- },
1232
- "indexes": {
1233
- "notification_devices_endpoint_unique": {
1234
- "name": "notification_devices_endpoint_unique",
1235
- "columns": [
1236
- "endpoint"
1237
- ],
1238
- "isUnique": true
1239
- },
1240
- "notification_devices_token_unique": {
1241
- "name": "notification_devices_token_unique",
1242
- "columns": [
1243
- "token"
1244
- ],
1245
- "isUnique": true
1246
- }
1247
- },
1248
- "foreignKeys": {
1249
- "notification_devices_user_id_users_id_fk": {
1250
- "name": "notification_devices_user_id_users_id_fk",
1251
- "tableFrom": "notification_devices",
1252
- "tableTo": "users",
1253
- "columnsFrom": [
1254
- "user_id"
1255
- ],
1256
- "columnsTo": [
1257
- "id"
1258
- ],
1259
- "onDelete": "cascade",
1260
- "onUpdate": "no action"
1261
- }
1262
- },
1263
- "compositePrimaryKeys": {},
1264
- "uniqueConstraints": {},
1265
- "checkConstraints": {}
1266
- },
1267
- "notification_preferences": {
1268
- "name": "notification_preferences",
1269
- "columns": {
1270
- "id": {
1271
- "name": "id",
1272
- "type": "text",
1273
- "primaryKey": true,
1274
- "notNull": true,
1275
- "autoincrement": false
1276
- },
1277
- "member_id": {
1278
- "name": "member_id",
1279
- "type": "text",
1280
- "primaryKey": false,
1281
- "notNull": true,
1282
- "autoincrement": false
1283
- },
1284
- "kind": {
1285
- "name": "kind",
1286
- "type": "text",
1287
- "primaryKey": false,
1288
- "notNull": true,
1289
- "autoincrement": false
1290
- },
1291
- "channel": {
1292
- "name": "channel",
1293
- "type": "text",
1294
- "primaryKey": false,
1295
- "notNull": true,
1296
- "autoincrement": false
1297
- },
1298
- "created_at": {
1299
- "name": "created_at",
1300
- "type": "integer",
1301
- "primaryKey": false,
1302
- "notNull": true,
1303
- "autoincrement": false
1304
- },
1305
- "updated_at": {
1306
- "name": "updated_at",
1307
- "type": "integer",
1308
- "primaryKey": false,
1309
- "notNull": true,
1310
- "autoincrement": false
1311
- }
1312
- },
1313
- "indexes": {
1314
- "notification_preferences_member_kind_channel_unique": {
1315
- "name": "notification_preferences_member_kind_channel_unique",
1316
- "columns": [
1317
- "member_id",
1318
- "kind",
1319
- "channel"
1320
- ],
1321
- "isUnique": true
1322
- }
1323
- },
1324
- "foreignKeys": {
1325
- "notification_preferences_member_id_members_id_fk": {
1326
- "name": "notification_preferences_member_id_members_id_fk",
1327
- "tableFrom": "notification_preferences",
1328
- "tableTo": "members",
1329
- "columnsFrom": [
1330
- "member_id"
1331
- ],
1332
- "columnsTo": [
1333
- "id"
1334
- ],
1335
- "onDelete": "cascade",
1336
- "onUpdate": "no action"
1337
- }
1338
- },
1339
- "compositePrimaryKeys": {},
1340
- "uniqueConstraints": {},
1341
- "checkConstraints": {}
1342
- },
1343
- "notification_send_logs": {
1344
- "name": "notification_send_logs",
1345
- "columns": {
1346
- "id": {
1347
- "name": "id",
1348
- "type": "text",
1349
- "primaryKey": true,
1350
- "notNull": true,
1351
- "autoincrement": false
1352
- },
1353
- "batch_id": {
1354
- "name": "batch_id",
1355
- "type": "text",
1356
- "primaryKey": false,
1357
- "notNull": true,
1358
- "autoincrement": false
1359
- },
1360
- "notification_id": {
1361
- "name": "notification_id",
1362
- "type": "text",
1363
- "primaryKey": false,
1364
- "notNull": true,
1365
- "autoincrement": false
1366
- },
1367
- "user_id": {
1368
- "name": "user_id",
1369
- "type": "text",
1370
- "primaryKey": false,
1371
- "notNull": true,
1372
- "autoincrement": false
1373
- },
1374
- "device_id": {
1375
- "name": "device_id",
1376
- "type": "text",
1377
- "primaryKey": false,
1378
- "notNull": false,
1379
- "autoincrement": false
1380
- },
1381
- "channel": {
1382
- "name": "channel",
1383
- "type": "text",
1384
- "primaryKey": false,
1385
- "notNull": true,
1386
- "autoincrement": false
1387
- },
1388
- "provider": {
1389
- "name": "provider",
1390
- "type": "text",
1391
- "primaryKey": false,
1392
- "notNull": false,
1393
- "autoincrement": false
1394
- },
1395
- "title": {
1396
- "name": "title",
1397
- "type": "text",
1398
- "primaryKey": false,
1399
- "notNull": true,
1400
- "autoincrement": false
1401
- },
1402
- "body": {
1403
- "name": "body",
1404
- "type": "text",
1405
- "primaryKey": false,
1406
- "notNull": true,
1407
- "autoincrement": false
1408
- },
1409
- "data": {
1410
- "name": "data",
1411
- "type": "text",
1412
- "primaryKey": false,
1413
- "notNull": false,
1414
- "autoincrement": false
1415
- },
1416
- "status": {
1417
- "name": "status",
1418
- "type": "text",
1419
- "primaryKey": false,
1420
- "notNull": true,
1421
- "autoincrement": false
1422
- },
1423
- "error": {
1424
- "name": "error",
1425
- "type": "text",
1426
- "primaryKey": false,
1427
- "notNull": false,
1428
- "autoincrement": false
1429
- },
1430
- "job_id": {
1431
- "name": "job_id",
1432
- "type": "text",
1433
- "primaryKey": false,
1434
- "notNull": false,
1435
- "autoincrement": false
1436
- },
1437
- "created_at": {
1438
- "name": "created_at",
1439
- "type": "integer",
1440
- "primaryKey": false,
1441
- "notNull": true,
1442
- "autoincrement": false
1443
- },
1444
- "updated_at": {
1445
- "name": "updated_at",
1446
- "type": "integer",
1447
- "primaryKey": false,
1448
- "notNull": true,
1449
- "autoincrement": false
1450
- }
1451
- },
1452
- "indexes": {},
1453
- "foreignKeys": {
1454
- "notification_send_logs_notification_id_notifications_id_fk": {
1455
- "name": "notification_send_logs_notification_id_notifications_id_fk",
1456
- "tableFrom": "notification_send_logs",
1457
- "tableTo": "notifications",
1458
- "columnsFrom": [
1459
- "notification_id"
1460
- ],
1461
- "columnsTo": [
1462
- "id"
1463
- ],
1464
- "onDelete": "cascade",
1465
- "onUpdate": "no action"
1466
- },
1467
- "notification_send_logs_user_id_users_id_fk": {
1468
- "name": "notification_send_logs_user_id_users_id_fk",
1469
- "tableFrom": "notification_send_logs",
1470
- "tableTo": "users",
1471
- "columnsFrom": [
1472
- "user_id"
1473
- ],
1474
- "columnsTo": [
1475
- "id"
1476
- ],
1477
- "onDelete": "cascade",
1478
- "onUpdate": "no action"
1479
- },
1480
- "notification_send_logs_device_id_notification_devices_id_fk": {
1481
- "name": "notification_send_logs_device_id_notification_devices_id_fk",
1482
- "tableFrom": "notification_send_logs",
1483
- "tableTo": "notification_devices",
1484
- "columnsFrom": [
1485
- "device_id"
1486
- ],
1487
- "columnsTo": [
1488
- "id"
1489
- ],
1490
- "onDelete": "set null",
1491
- "onUpdate": "no action"
1492
- }
1493
- },
1494
- "compositePrimaryKeys": {},
1495
- "uniqueConstraints": {},
1496
- "checkConstraints": {}
1497
- },
1498
- "notifications": {
1499
- "name": "notifications",
1500
- "columns": {
1501
- "id": {
1502
- "name": "id",
1503
- "type": "text",
1504
- "primaryKey": true,
1505
- "notNull": true,
1506
- "autoincrement": false
1507
- },
1508
- "member_id": {
1509
- "name": "member_id",
1510
- "type": "text",
1511
- "primaryKey": false,
1512
- "notNull": true,
1513
- "autoincrement": false
1514
- },
1515
- "user_id": {
1516
- "name": "user_id",
1517
- "type": "text",
1518
- "primaryKey": false,
1519
- "notNull": true,
1520
- "autoincrement": false
1521
- },
1522
- "kind": {
1523
- "name": "kind",
1524
- "type": "text",
1525
- "primaryKey": false,
1526
- "notNull": true,
1527
- "autoincrement": false
1528
- },
1529
- "title": {
1530
- "name": "title",
1531
- "type": "text",
1532
- "primaryKey": false,
1533
- "notNull": true,
1534
- "autoincrement": false
1535
- },
1536
- "body": {
1537
- "name": "body",
1538
- "type": "text",
1539
- "primaryKey": false,
1540
- "notNull": true,
1541
- "autoincrement": false
1542
- },
1543
- "data": {
1544
- "name": "data",
1545
- "type": "text",
1546
- "primaryKey": false,
1547
- "notNull": false,
1548
- "autoincrement": false
1549
- },
1550
- "visible_in_inbox": {
1551
- "name": "visible_in_inbox",
1552
- "type": "integer",
1553
- "primaryKey": false,
1554
- "notNull": true,
1555
- "autoincrement": false,
1556
- "default": false
1557
- },
1558
- "armed_channels": {
1559
- "name": "armed_channels",
1560
- "type": "text",
1561
- "primaryKey": false,
1562
- "notNull": true,
1563
- "autoincrement": false,
1564
- "default": "'[]'"
1565
- },
1566
- "web_pushed_at": {
1567
- "name": "web_pushed_at",
1568
- "type": "integer",
1569
- "primaryKey": false,
1570
- "notNull": false,
1571
- "autoincrement": false
1572
- },
1573
- "mobile_pushed_at": {
1574
- "name": "mobile_pushed_at",
1575
- "type": "integer",
1576
- "primaryKey": false,
1577
- "notNull": false,
1578
- "autoincrement": false
1579
- },
1580
- "emailed_at": {
1581
- "name": "emailed_at",
1582
- "type": "integer",
1583
- "primaryKey": false,
1584
- "notNull": false,
1585
- "autoincrement": false
1586
- },
1587
- "read_at": {
1588
- "name": "read_at",
1589
- "type": "integer",
1590
- "primaryKey": false,
1591
- "notNull": false,
1592
- "autoincrement": false
1593
- },
1594
- "created_at": {
1595
- "name": "created_at",
1596
- "type": "integer",
1597
- "primaryKey": false,
1598
- "notNull": true,
1599
- "autoincrement": false
1600
- },
1601
- "updated_at": {
1602
- "name": "updated_at",
1603
- "type": "integer",
1604
- "primaryKey": false,
1605
- "notNull": true,
1606
- "autoincrement": false
1607
- }
1608
- },
1609
- "indexes": {},
1610
- "foreignKeys": {
1611
- "notifications_member_id_members_id_fk": {
1612
- "name": "notifications_member_id_members_id_fk",
1613
- "tableFrom": "notifications",
1614
- "tableTo": "members",
1615
- "columnsFrom": [
1616
- "member_id"
1617
- ],
1618
- "columnsTo": [
1619
- "id"
1620
- ],
1621
- "onDelete": "cascade",
1622
- "onUpdate": "no action"
1623
- },
1624
- "notifications_user_id_users_id_fk": {
1625
- "name": "notifications_user_id_users_id_fk",
1626
- "tableFrom": "notifications",
1627
- "tableTo": "users",
1628
- "columnsFrom": [
1629
- "user_id"
1630
- ],
1631
- "columnsTo": [
1632
- "id"
1633
- ],
1634
- "onDelete": "cascade",
1635
- "onUpdate": "no action"
1636
- }
1637
- },
1638
- "compositePrimaryKeys": {},
1639
- "uniqueConstraints": {},
1640
- "checkConstraints": {}
1641
- },
1642
- "organizations": {
1643
- "name": "organizations",
1644
- "columns": {
1645
- "id": {
1646
- "name": "id",
1647
- "type": "text",
1648
- "primaryKey": true,
1649
- "notNull": true,
1650
- "autoincrement": false
1651
- },
1652
- "name": {
1653
- "name": "name",
1654
- "type": "text",
1655
- "primaryKey": false,
1656
- "notNull": true,
1657
- "autoincrement": false
1658
- },
1659
- "slug": {
1660
- "name": "slug",
1661
- "type": "text",
1662
- "primaryKey": false,
1663
- "notNull": false,
1664
- "autoincrement": false
1665
- },
1666
- "logo": {
1667
- "name": "logo",
1668
- "type": "text",
1669
- "primaryKey": false,
1670
- "notNull": false,
1671
- "autoincrement": false
1672
- },
1673
- "type": {
1674
- "name": "type",
1675
- "type": "text",
1676
- "primaryKey": false,
1677
- "notNull": false,
1678
- "autoincrement": false
1679
- },
1680
- "parent_id": {
1681
- "name": "parent_id",
1682
- "type": "text",
1683
- "primaryKey": false,
1684
- "notNull": false,
1685
- "autoincrement": false
1686
- },
1687
- "created_at": {
1688
- "name": "created_at",
1689
- "type": "integer",
1690
- "primaryKey": false,
1691
- "notNull": true,
1692
- "autoincrement": false
1693
- },
1694
- "onboarding": {
1695
- "name": "onboarding",
1696
- "type": "integer",
1697
- "primaryKey": false,
1698
- "notNull": false,
1699
- "autoincrement": false
1700
- },
1701
- "preferences": {
1702
- "name": "preferences",
1703
- "type": "text",
1704
- "primaryKey": false,
1705
- "notNull": false,
1706
- "autoincrement": false,
1707
- "default": "'{}'"
1708
- },
1709
- "metadata": {
1710
- "name": "metadata",
1711
- "type": "text",
1712
- "primaryKey": false,
1713
- "notNull": false,
1714
- "autoincrement": false,
1715
- "default": "'{}'"
1716
- },
1717
- "flags": {
1718
- "name": "flags",
1719
- "type": "text",
1720
- "primaryKey": false,
1721
- "notNull": false,
1722
- "autoincrement": false,
1723
- "default": "'[]'"
1724
- },
1725
- "locale": {
1726
- "name": "locale",
1727
- "type": "text",
1728
- "primaryKey": false,
1729
- "notNull": false,
1730
- "autoincrement": false
1731
- }
1732
- },
1733
- "indexes": {
1734
- "organizations_slug_unique": {
1735
- "name": "organizations_slug_unique",
1736
- "columns": [
1737
- "slug"
1738
- ],
1739
- "isUnique": true
1740
- }
1741
- },
1742
- "foreignKeys": {
1743
- "organizations_parent_id_organizations_id_fk": {
1744
- "name": "organizations_parent_id_organizations_id_fk",
1745
- "tableFrom": "organizations",
1746
- "tableTo": "organizations",
1747
- "columnsFrom": [
1748
- "parent_id"
1749
- ],
1750
- "columnsTo": [
1751
- "id"
1752
- ],
1753
- "onDelete": "set null",
1754
- "onUpdate": "no action"
1755
- }
1756
- },
1757
- "compositePrimaryKeys": {},
1758
- "uniqueConstraints": {},
1759
- "checkConstraints": {}
1760
- },
1761
- "posts": {
1762
- "name": "posts",
1763
- "columns": {
1764
- "id": {
1765
- "name": "id",
1766
- "type": "text",
1767
- "primaryKey": true,
1768
- "notNull": true,
1769
- "autoincrement": false
1770
- },
1771
- "author_user_id": {
1772
- "name": "author_user_id",
1773
- "type": "text",
1774
- "primaryKey": false,
1775
- "notNull": false,
1776
- "autoincrement": false
1777
- },
1778
- "member_id": {
1779
- "name": "member_id",
1780
- "type": "text",
1781
- "primaryKey": false,
1782
- "notNull": false,
1783
- "autoincrement": false
1784
- },
1785
- "organization_id": {
1786
- "name": "organization_id",
1787
- "type": "text",
1788
- "primaryKey": false,
1789
- "notNull": false,
1790
- "autoincrement": false
1791
- },
1792
- "team_id": {
1793
- "name": "team_id",
1794
- "type": "text",
1795
- "primaryKey": false,
1796
- "notNull": false,
1797
- "autoincrement": false
1798
- },
1799
- "title": {
1800
- "name": "title",
1801
- "type": "text",
1802
- "primaryKey": false,
1803
- "notNull": true,
1804
- "autoincrement": false
1805
- },
1806
- "slug": {
1807
- "name": "slug",
1808
- "type": "text",
1809
- "primaryKey": false,
1810
- "notNull": true,
1811
- "autoincrement": false
1812
- },
1813
- "excerpt": {
1814
- "name": "excerpt",
1815
- "type": "text",
1816
- "primaryKey": false,
1817
- "notNull": false,
1818
- "autoincrement": false
1819
- },
1820
- "content": {
1821
- "name": "content",
1822
- "type": "text",
1823
- "primaryKey": false,
1824
- "notNull": true,
1825
- "autoincrement": false
1826
- },
1827
- "status": {
1828
- "name": "status",
1829
- "type": "text",
1830
- "primaryKey": false,
1831
- "notNull": true,
1832
- "autoincrement": false,
1833
- "default": "'draft'"
1834
- },
1835
- "published_at": {
1836
- "name": "published_at",
1837
- "type": "integer",
1838
- "primaryKey": false,
1839
- "notNull": false,
1840
- "autoincrement": false
1841
- },
1842
- "created_at": {
1843
- "name": "created_at",
1844
- "type": "integer",
1845
- "primaryKey": false,
1846
- "notNull": true,
1847
- "autoincrement": false
1848
- },
1849
- "updated_at": {
1850
- "name": "updated_at",
1851
- "type": "integer",
1852
- "primaryKey": false,
1853
- "notNull": false,
1854
- "autoincrement": false
1855
- },
1856
- "deleted_at": {
1857
- "name": "deleted_at",
1858
- "type": "integer",
1859
- "primaryKey": false,
1860
- "notNull": false,
1861
- "autoincrement": false
1862
- }
1863
- },
1864
- "indexes": {
1865
- "posts_slug_unique": {
1866
- "name": "posts_slug_unique",
1867
- "columns": [
1868
- "slug"
1869
- ],
1870
- "isUnique": true
1871
- }
1872
- },
1873
- "foreignKeys": {
1874
- "posts_author_user_id_users_id_fk": {
1875
- "name": "posts_author_user_id_users_id_fk",
1876
- "tableFrom": "posts",
1877
- "tableTo": "users",
1878
- "columnsFrom": [
1879
- "author_user_id"
1880
- ],
1881
- "columnsTo": [
1882
- "id"
1883
- ],
1884
- "onDelete": "set null",
1885
- "onUpdate": "no action"
1886
- },
1887
- "posts_member_id_members_id_fk": {
1888
- "name": "posts_member_id_members_id_fk",
1889
- "tableFrom": "posts",
1890
- "tableTo": "members",
1891
- "columnsFrom": [
1892
- "member_id"
1893
- ],
1894
- "columnsTo": [
1895
- "id"
1896
- ],
1897
- "onDelete": "set null",
1898
- "onUpdate": "no action"
1899
- },
1900
- "posts_organization_id_organizations_id_fk": {
1901
- "name": "posts_organization_id_organizations_id_fk",
1902
- "tableFrom": "posts",
1903
- "tableTo": "organizations",
1904
- "columnsFrom": [
1905
- "organization_id"
1906
- ],
1907
- "columnsTo": [
1908
- "id"
1909
- ],
1910
- "onDelete": "set null",
1911
- "onUpdate": "no action"
1912
- }
1913
- },
1914
- "compositePrimaryKeys": {},
1915
- "uniqueConstraints": {},
1916
- "checkConstraints": {}
1917
- },
1918
- "sessions": {
1919
- "name": "sessions",
1920
- "columns": {
1921
- "id": {
1922
- "name": "id",
1923
- "type": "text",
1924
- "primaryKey": true,
1925
- "notNull": true,
1926
- "autoincrement": false
1927
- },
1928
- "expires_at": {
1929
- "name": "expires_at",
1930
- "type": "integer",
1931
- "primaryKey": false,
1932
- "notNull": true,
1933
- "autoincrement": false
1934
- },
1935
- "token": {
1936
- "name": "token",
1937
- "type": "text",
1938
- "primaryKey": false,
1939
- "notNull": true,
1940
- "autoincrement": false
1941
- },
1942
- "created_at": {
1943
- "name": "created_at",
1944
- "type": "integer",
1945
- "primaryKey": false,
1946
- "notNull": true,
1947
- "autoincrement": false
1948
- },
1949
- "updated_at": {
1950
- "name": "updated_at",
1951
- "type": "integer",
1952
- "primaryKey": false,
1953
- "notNull": true,
1954
- "autoincrement": false
1955
- },
1956
- "ip_address": {
1957
- "name": "ip_address",
1958
- "type": "text",
1959
- "primaryKey": false,
1960
- "notNull": false,
1961
- "autoincrement": false
1962
- },
1963
- "user_agent": {
1964
- "name": "user_agent",
1965
- "type": "text",
1966
- "primaryKey": false,
1967
- "notNull": false,
1968
- "autoincrement": false
1969
- },
1970
- "user_id": {
1971
- "name": "user_id",
1972
- "type": "text",
1973
- "primaryKey": false,
1974
- "notNull": true,
1975
- "autoincrement": false
1976
- },
1977
- "impersonated_by": {
1978
- "name": "impersonated_by",
1979
- "type": "text",
1980
- "primaryKey": false,
1981
- "notNull": false,
1982
- "autoincrement": false
1983
- },
1984
- "active_organization_id": {
1985
- "name": "active_organization_id",
1986
- "type": "text",
1987
- "primaryKey": false,
1988
- "notNull": false,
1989
- "autoincrement": false
1990
- },
1991
- "active_organization_member_id": {
1992
- "name": "active_organization_member_id",
1993
- "type": "text",
1994
- "primaryKey": false,
1995
- "notNull": false,
1996
- "autoincrement": false
1997
- },
1998
- "active_organization_role": {
1999
- "name": "active_organization_role",
2000
- "type": "text",
2001
- "primaryKey": false,
2002
- "notNull": false,
2003
- "autoincrement": false
2004
- },
2005
- "active_organization_type": {
2006
- "name": "active_organization_type",
2007
- "type": "text",
2008
- "primaryKey": false,
2009
- "notNull": false,
2010
- "autoincrement": false
2011
- }
2012
- },
2013
- "indexes": {
2014
- "sessions_token_unique": {
2015
- "name": "sessions_token_unique",
2016
- "columns": [
2017
- "token"
2018
- ],
2019
- "isUnique": true
2020
- }
2021
- },
2022
- "foreignKeys": {
2023
- "sessions_user_id_users_id_fk": {
2024
- "name": "sessions_user_id_users_id_fk",
2025
- "tableFrom": "sessions",
2026
- "tableTo": "users",
2027
- "columnsFrom": [
2028
- "user_id"
2029
- ],
2030
- "columnsTo": [
2031
- "id"
2032
- ],
2033
- "onDelete": "cascade",
2034
- "onUpdate": "no action"
2035
- }
2036
- },
2037
- "compositePrimaryKeys": {},
2038
- "uniqueConstraints": {},
2039
- "checkConstraints": {}
2040
- },
2041
- "users": {
2042
- "name": "users",
2043
- "columns": {
2044
- "id": {
2045
- "name": "id",
2046
- "type": "text",
2047
- "primaryKey": true,
2048
- "notNull": true,
2049
- "autoincrement": false
2050
- },
2051
- "name": {
2052
- "name": "name",
2053
- "type": "text",
2054
- "primaryKey": false,
2055
- "notNull": true,
2056
- "autoincrement": false
2057
- },
2058
- "email": {
2059
- "name": "email",
2060
- "type": "text",
2061
- "primaryKey": false,
2062
- "notNull": true,
2063
- "autoincrement": false
2064
- },
2065
- "email_verified": {
2066
- "name": "email_verified",
2067
- "type": "integer",
2068
- "primaryKey": false,
2069
- "notNull": true,
2070
- "autoincrement": false
2071
- },
2072
- "image": {
2073
- "name": "image",
2074
- "type": "text",
2075
- "primaryKey": false,
2076
- "notNull": false,
2077
- "autoincrement": false
2078
- },
2079
- "created_at": {
2080
- "name": "created_at",
2081
- "type": "integer",
2082
- "primaryKey": false,
2083
- "notNull": true,
2084
- "autoincrement": false
2085
- },
2086
- "updated_at": {
2087
- "name": "updated_at",
2088
- "type": "integer",
2089
- "primaryKey": false,
2090
- "notNull": true,
2091
- "autoincrement": false
2092
- },
2093
- "role": {
2094
- "name": "role",
2095
- "type": "text",
2096
- "primaryKey": false,
2097
- "notNull": false,
2098
- "autoincrement": false
2099
- },
2100
- "banned": {
2101
- "name": "banned",
2102
- "type": "integer",
2103
- "primaryKey": false,
2104
- "notNull": false,
2105
- "autoincrement": false
2106
- },
2107
- "ban_reason": {
2108
- "name": "ban_reason",
2109
- "type": "text",
2110
- "primaryKey": false,
2111
- "notNull": false,
2112
- "autoincrement": false
2113
- },
2114
- "ban_expires": {
2115
- "name": "ban_expires",
2116
- "type": "integer",
2117
- "primaryKey": false,
2118
- "notNull": false,
2119
- "autoincrement": false
2120
- },
2121
- "stripe_customer_id": {
2122
- "name": "stripe_customer_id",
2123
- "type": "text",
2124
- "primaryKey": false,
2125
- "notNull": false,
2126
- "autoincrement": false
2127
- },
2128
- "preferences": {
2129
- "name": "preferences",
2130
- "type": "text",
2131
- "primaryKey": false,
2132
- "notNull": false,
2133
- "autoincrement": false,
2134
- "default": "'{}'"
2135
- },
2136
- "metadata": {
2137
- "name": "metadata",
2138
- "type": "text",
2139
- "primaryKey": false,
2140
- "notNull": false,
2141
- "autoincrement": false,
2142
- "default": "'{}'"
2143
- },
2144
- "onboarding": {
2145
- "name": "onboarding",
2146
- "type": "integer",
2147
- "primaryKey": false,
2148
- "notNull": false,
2149
- "autoincrement": false
2150
- },
2151
- "flags": {
2152
- "name": "flags",
2153
- "type": "text",
2154
- "primaryKey": false,
2155
- "notNull": false,
2156
- "autoincrement": false,
2157
- "default": "'[]'"
2158
- },
2159
- "locale": {
2160
- "name": "locale",
2161
- "type": "text",
2162
- "primaryKey": false,
2163
- "notNull": false,
2164
- "autoincrement": false
2165
- }
2166
- },
2167
- "indexes": {
2168
- "users_email_unique": {
2169
- "name": "users_email_unique",
2170
- "columns": [
2171
- "email"
2172
- ],
2173
- "isUnique": true
2174
- },
2175
- "users_stripe_customer_id_unique": {
2176
- "name": "users_stripe_customer_id_unique",
2177
- "columns": [
2178
- "stripe_customer_id"
2179
- ],
2180
- "isUnique": true
2181
- }
2182
- },
2183
- "foreignKeys": {},
2184
- "compositePrimaryKeys": {},
2185
- "uniqueConstraints": {},
2186
- "checkConstraints": {}
2187
- },
2188
- "verifications": {
2189
- "name": "verifications",
2190
- "columns": {
2191
- "id": {
2192
- "name": "id",
2193
- "type": "text",
2194
- "primaryKey": true,
2195
- "notNull": true,
2196
- "autoincrement": false
2197
- },
2198
- "identifier": {
2199
- "name": "identifier",
2200
- "type": "text",
2201
- "primaryKey": false,
2202
- "notNull": true,
2203
- "autoincrement": false
2204
- },
2205
- "value": {
2206
- "name": "value",
2207
- "type": "text",
2208
- "primaryKey": false,
2209
- "notNull": true,
2210
- "autoincrement": false
2211
- },
2212
- "expires_at": {
2213
- "name": "expires_at",
2214
- "type": "integer",
2215
- "primaryKey": false,
2216
- "notNull": true,
2217
- "autoincrement": false
2218
- },
2219
- "created_at": {
2220
- "name": "created_at",
2221
- "type": "integer",
2222
- "primaryKey": false,
2223
- "notNull": false,
2224
- "autoincrement": false
2225
- },
2226
- "updated_at": {
2227
- "name": "updated_at",
2228
- "type": "integer",
2229
- "primaryKey": false,
2230
- "notNull": false,
2231
- "autoincrement": false
2232
- }
2233
- },
2234
- "indexes": {},
2235
- "foreignKeys": {},
2236
- "compositePrimaryKeys": {},
2237
- "uniqueConstraints": {},
2238
- "checkConstraints": {}
2239
- },
2240
- "waitlist": {
2241
- "name": "waitlist",
2242
- "columns": {
2243
- "id": {
2244
- "name": "id",
2245
- "type": "text",
2246
- "primaryKey": true,
2247
- "notNull": true,
2248
- "autoincrement": false
2249
- },
2250
- "name": {
2251
- "name": "name",
2252
- "type": "text",
2253
- "primaryKey": false,
2254
- "notNull": false,
2255
- "autoincrement": false
2256
- },
2257
- "email": {
2258
- "name": "email",
2259
- "type": "text",
2260
- "primaryKey": false,
2261
- "notNull": false,
2262
- "autoincrement": false
2263
- },
2264
- "created_at": {
2265
- "name": "created_at",
2266
- "type": "integer",
2267
- "primaryKey": false,
2268
- "notNull": true,
2269
- "autoincrement": false
2270
- },
2271
- "updated_at": {
2272
- "name": "updated_at",
2273
- "type": "integer",
2274
- "primaryKey": false,
2275
- "notNull": false,
2276
- "autoincrement": false
2277
- },
2278
- "status": {
2279
- "name": "status",
2280
- "type": "text",
2281
- "primaryKey": false,
2282
- "notNull": true,
2283
- "autoincrement": false,
2284
- "default": "'WAITLIST'"
2285
- },
2286
- "code": {
2287
- "name": "code",
2288
- "type": "text",
2289
- "primaryKey": false,
2290
- "notNull": false,
2291
- "autoincrement": false
2292
- },
2293
- "expires_at": {
2294
- "name": "expires_at",
2295
- "type": "integer",
2296
- "primaryKey": false,
2297
- "notNull": false,
2298
- "autoincrement": false
2299
- },
2300
- "user_id": {
2301
- "name": "user_id",
2302
- "type": "text",
2303
- "primaryKey": false,
2304
- "notNull": false,
2305
- "autoincrement": false
2306
- }
2307
- },
2308
- "indexes": {},
2309
- "foreignKeys": {
2310
- "waitlist_user_id_users_id_fk": {
2311
- "name": "waitlist_user_id_users_id_fk",
2312
- "tableFrom": "waitlist",
2313
- "tableTo": "users",
2314
- "columnsFrom": [
2315
- "user_id"
2316
- ],
2317
- "columnsTo": [
2318
- "id"
2319
- ],
2320
- "onDelete": "no action",
2321
- "onUpdate": "no action"
2322
- }
2323
- },
2324
- "compositePrimaryKeys": {},
2325
- "uniqueConstraints": {},
2326
- "checkConstraints": {}
2327
- },
2328
- "workflows": {
2329
- "name": "workflows",
2330
- "columns": {
2331
- "id": {
2332
- "name": "id",
2333
- "type": "text",
2334
- "primaryKey": true,
2335
- "notNull": true,
2336
- "autoincrement": false
2337
- },
2338
- "user_id": {
2339
- "name": "user_id",
2340
- "type": "text",
2341
- "primaryKey": false,
2342
- "notNull": false,
2343
- "autoincrement": false
2344
- },
2345
- "job_id": {
2346
- "name": "job_id",
2347
- "type": "text",
2348
- "primaryKey": false,
2349
- "notNull": true,
2350
- "autoincrement": false
2351
- },
2352
- "job_name": {
2353
- "name": "job_name",
2354
- "type": "text",
2355
- "primaryKey": false,
2356
- "notNull": true,
2357
- "autoincrement": false
2358
- },
2359
- "queue_name": {
2360
- "name": "queue_name",
2361
- "type": "text",
2362
- "primaryKey": false,
2363
- "notNull": true,
2364
- "autoincrement": false
2365
- },
2366
- "timeout": {
2367
- "name": "timeout",
2368
- "type": "integer",
2369
- "primaryKey": false,
2370
- "notNull": false,
2371
- "autoincrement": false
2372
- },
2373
- "tags": {
2374
- "name": "tags",
2375
- "type": "text",
2376
- "primaryKey": false,
2377
- "notNull": false,
2378
- "autoincrement": false
2379
- },
2380
- "input": {
2381
- "name": "input",
2382
- "type": "text",
2383
- "primaryKey": false,
2384
- "notNull": false,
2385
- "autoincrement": false
2386
- },
2387
- "output": {
2388
- "name": "output",
2389
- "type": "text",
2390
- "primaryKey": false,
2391
- "notNull": false,
2392
- "autoincrement": false
2393
- },
2394
- "status": {
2395
- "name": "status",
2396
- "type": "text",
2397
- "primaryKey": false,
2398
- "notNull": true,
2399
- "autoincrement": false
2400
- },
2401
- "error": {
2402
- "name": "error",
2403
- "type": "text",
2404
- "primaryKey": false,
2405
- "notNull": false,
2406
- "autoincrement": false
2407
- },
2408
- "retries": {
2409
- "name": "retries",
2410
- "type": "integer",
2411
- "primaryKey": false,
2412
- "notNull": true,
2413
- "autoincrement": false,
2414
- "default": 0
2415
- },
2416
- "finished_at": {
2417
- "name": "finished_at",
2418
- "type": "integer",
2419
- "primaryKey": false,
2420
- "notNull": false,
2421
- "autoincrement": false
2422
- },
2423
- "processed_at": {
2424
- "name": "processed_at",
2425
- "type": "integer",
2426
- "primaryKey": false,
2427
- "notNull": false,
2428
- "autoincrement": false
2429
- },
2430
- "created_at": {
2431
- "name": "created_at",
2432
- "type": "integer",
2433
- "primaryKey": false,
2434
- "notNull": true,
2435
- "autoincrement": false
2436
- },
2437
- "updated_at": {
2438
- "name": "updated_at",
2439
- "type": "integer",
2440
- "primaryKey": false,
2441
- "notNull": true,
2442
- "autoincrement": false
2443
- }
2444
- },
2445
- "indexes": {
2446
- "workflows_job_id_unique": {
2447
- "name": "workflows_job_id_unique",
2448
- "columns": [
2449
- "job_id"
2450
- ],
2451
- "isUnique": true
2452
- }
2453
- },
2454
- "foreignKeys": {
2455
- "workflows_user_id_users_id_fk": {
2456
- "name": "workflows_user_id_users_id_fk",
2457
- "tableFrom": "workflows",
2458
- "tableTo": "users",
2459
- "columnsFrom": [
2460
- "user_id"
2461
- ],
2462
- "columnsTo": [
2463
- "id"
2464
- ],
2465
- "onDelete": "cascade",
2466
- "onUpdate": "no action"
2467
- }
2468
- },
2469
- "compositePrimaryKeys": {},
2470
- "uniqueConstraints": {},
2471
- "checkConstraints": {}
2472
- }
2473
- },
2474
- "views": {},
2475
- "enums": {},
2476
- "_meta": {
2477
- "schemas": {},
2478
- "tables": {},
2479
- "columns": {}
2480
- },
2481
- "internal": {
2482
- "indexes": {}
2483
- }
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "a46291f0-75cc-40ae-a97d-e2f9bf558763",
5
+ "prevId": "4debd6f2-0866-4e12-a1bf-844285823693",
6
+ "tables": {
7
+ "account_claim_magic_links": {
8
+ "name": "account_claim_magic_links",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "claim_id": {
18
+ "name": "claim_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "user_id": {
25
+ "name": "user_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "email": {
32
+ "name": "email",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "token": {
39
+ "name": "token",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "url": {
46
+ "name": "url",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "expires_at": {
53
+ "name": "expires_at",
54
+ "type": "integer",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "created_at": {
60
+ "name": "created_at",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ }
66
+ },
67
+ "indexes": {},
68
+ "foreignKeys": {
69
+ "account_claim_magic_links_claim_id_account_claims_id_fk": {
70
+ "name": "account_claim_magic_links_claim_id_account_claims_id_fk",
71
+ "tableFrom": "account_claim_magic_links",
72
+ "tableTo": "account_claims",
73
+ "columnsFrom": [
74
+ "claim_id"
75
+ ],
76
+ "columnsTo": [
77
+ "id"
78
+ ],
79
+ "onDelete": "cascade",
80
+ "onUpdate": "no action"
81
+ },
82
+ "account_claim_magic_links_user_id_users_id_fk": {
83
+ "name": "account_claim_magic_links_user_id_users_id_fk",
84
+ "tableFrom": "account_claim_magic_links",
85
+ "tableTo": "users",
86
+ "columnsFrom": [
87
+ "user_id"
88
+ ],
89
+ "columnsTo": [
90
+ "id"
91
+ ],
92
+ "onDelete": "cascade",
93
+ "onUpdate": "no action"
94
+ }
95
+ },
96
+ "compositePrimaryKeys": {},
97
+ "uniqueConstraints": {},
98
+ "checkConstraints": {}
99
+ },
100
+ "account_claims": {
101
+ "name": "account_claims",
102
+ "columns": {
103
+ "id": {
104
+ "name": "id",
105
+ "type": "text",
106
+ "primaryKey": true,
107
+ "notNull": true,
108
+ "autoincrement": false
109
+ },
110
+ "claim_user_id": {
111
+ "name": "claim_user_id",
112
+ "type": "text",
113
+ "primaryKey": false,
114
+ "notNull": true,
115
+ "autoincrement": false
116
+ },
117
+ "status": {
118
+ "name": "status",
119
+ "type": "text",
120
+ "primaryKey": false,
121
+ "notNull": true,
122
+ "autoincrement": false
123
+ },
124
+ "code": {
125
+ "name": "code",
126
+ "type": "text",
127
+ "primaryKey": false,
128
+ "notNull": false,
129
+ "autoincrement": false
130
+ },
131
+ "expires_at": {
132
+ "name": "expires_at",
133
+ "type": "integer",
134
+ "primaryKey": false,
135
+ "notNull": false,
136
+ "autoincrement": false
137
+ },
138
+ "claimed_at": {
139
+ "name": "claimed_at",
140
+ "type": "integer",
141
+ "primaryKey": false,
142
+ "notNull": false,
143
+ "autoincrement": false
144
+ },
145
+ "claimed_email": {
146
+ "name": "claimed_email",
147
+ "type": "text",
148
+ "primaryKey": false,
149
+ "notNull": false,
150
+ "autoincrement": false
151
+ },
152
+ "created_at": {
153
+ "name": "created_at",
154
+ "type": "integer",
155
+ "primaryKey": false,
156
+ "notNull": true,
157
+ "autoincrement": false
158
+ },
159
+ "updated_at": {
160
+ "name": "updated_at",
161
+ "type": "integer",
162
+ "primaryKey": false,
163
+ "notNull": false,
164
+ "autoincrement": false
165
+ }
166
+ },
167
+ "indexes": {},
168
+ "foreignKeys": {
169
+ "account_claims_claim_user_id_users_id_fk": {
170
+ "name": "account_claims_claim_user_id_users_id_fk",
171
+ "tableFrom": "account_claims",
172
+ "tableTo": "users",
173
+ "columnsFrom": [
174
+ "claim_user_id"
175
+ ],
176
+ "columnsTo": [
177
+ "id"
178
+ ],
179
+ "onDelete": "no action",
180
+ "onUpdate": "no action"
181
+ }
182
+ },
183
+ "compositePrimaryKeys": {},
184
+ "uniqueConstraints": {},
185
+ "checkConstraints": {}
186
+ },
187
+ "accounts": {
188
+ "name": "accounts",
189
+ "columns": {
190
+ "id": {
191
+ "name": "id",
192
+ "type": "text",
193
+ "primaryKey": true,
194
+ "notNull": true,
195
+ "autoincrement": false
196
+ },
197
+ "account_id": {
198
+ "name": "account_id",
199
+ "type": "text",
200
+ "primaryKey": false,
201
+ "notNull": true,
202
+ "autoincrement": false
203
+ },
204
+ "provider_id": {
205
+ "name": "provider_id",
206
+ "type": "text",
207
+ "primaryKey": false,
208
+ "notNull": true,
209
+ "autoincrement": false
210
+ },
211
+ "user_id": {
212
+ "name": "user_id",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": true,
216
+ "autoincrement": false
217
+ },
218
+ "access_token": {
219
+ "name": "access_token",
220
+ "type": "text",
221
+ "primaryKey": false,
222
+ "notNull": false,
223
+ "autoincrement": false
224
+ },
225
+ "refresh_token": {
226
+ "name": "refresh_token",
227
+ "type": "text",
228
+ "primaryKey": false,
229
+ "notNull": false,
230
+ "autoincrement": false
231
+ },
232
+ "id_token": {
233
+ "name": "id_token",
234
+ "type": "text",
235
+ "primaryKey": false,
236
+ "notNull": false,
237
+ "autoincrement": false
238
+ },
239
+ "access_token_expires_at": {
240
+ "name": "access_token_expires_at",
241
+ "type": "integer",
242
+ "primaryKey": false,
243
+ "notNull": false,
244
+ "autoincrement": false
245
+ },
246
+ "refresh_token_expires_at": {
247
+ "name": "refresh_token_expires_at",
248
+ "type": "integer",
249
+ "primaryKey": false,
250
+ "notNull": false,
251
+ "autoincrement": false
252
+ },
253
+ "scope": {
254
+ "name": "scope",
255
+ "type": "text",
256
+ "primaryKey": false,
257
+ "notNull": false,
258
+ "autoincrement": false
259
+ },
260
+ "password": {
261
+ "name": "password",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": false,
265
+ "autoincrement": false
266
+ },
267
+ "created_at": {
268
+ "name": "created_at",
269
+ "type": "integer",
270
+ "primaryKey": false,
271
+ "notNull": true,
272
+ "autoincrement": false
273
+ },
274
+ "updated_at": {
275
+ "name": "updated_at",
276
+ "type": "integer",
277
+ "primaryKey": false,
278
+ "notNull": true,
279
+ "autoincrement": false
280
+ }
281
+ },
282
+ "indexes": {},
283
+ "foreignKeys": {
284
+ "accounts_user_id_users_id_fk": {
285
+ "name": "accounts_user_id_users_id_fk",
286
+ "tableFrom": "accounts",
287
+ "tableTo": "users",
288
+ "columnsFrom": [
289
+ "user_id"
290
+ ],
291
+ "columnsTo": [
292
+ "id"
293
+ ],
294
+ "onDelete": "cascade",
295
+ "onUpdate": "no action"
296
+ }
297
+ },
298
+ "compositePrimaryKeys": {},
299
+ "uniqueConstraints": {},
300
+ "checkConstraints": {}
301
+ },
302
+ "ai_usage": {
303
+ "name": "ai_usage",
304
+ "columns": {
305
+ "id": {
306
+ "name": "id",
307
+ "type": "text",
308
+ "primaryKey": true,
309
+ "notNull": true,
310
+ "autoincrement": false
311
+ },
312
+ "user_id": {
313
+ "name": "user_id",
314
+ "type": "text",
315
+ "primaryKey": false,
316
+ "notNull": false,
317
+ "autoincrement": false
318
+ },
319
+ "member_id": {
320
+ "name": "member_id",
321
+ "type": "text",
322
+ "primaryKey": false,
323
+ "notNull": false,
324
+ "autoincrement": false
325
+ },
326
+ "team_id": {
327
+ "name": "team_id",
328
+ "type": "text",
329
+ "primaryKey": false,
330
+ "notNull": false,
331
+ "autoincrement": false
332
+ },
333
+ "organization_id": {
334
+ "name": "organization_id",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": false,
338
+ "autoincrement": false
339
+ },
340
+ "feature": {
341
+ "name": "feature",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": true,
345
+ "autoincrement": false
346
+ },
347
+ "provider": {
348
+ "name": "provider",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": true,
352
+ "autoincrement": false
353
+ },
354
+ "model": {
355
+ "name": "model",
356
+ "type": "text",
357
+ "primaryKey": false,
358
+ "notNull": true,
359
+ "autoincrement": false
360
+ },
361
+ "input_tokens": {
362
+ "name": "input_tokens",
363
+ "type": "integer",
364
+ "primaryKey": false,
365
+ "notNull": false,
366
+ "autoincrement": false
367
+ },
368
+ "output_tokens": {
369
+ "name": "output_tokens",
370
+ "type": "integer",
371
+ "primaryKey": false,
372
+ "notNull": false,
373
+ "autoincrement": false
374
+ },
375
+ "total_tokens": {
376
+ "name": "total_tokens",
377
+ "type": "integer",
378
+ "primaryKey": false,
379
+ "notNull": false,
380
+ "autoincrement": false
381
+ },
382
+ "cost": {
383
+ "name": "cost",
384
+ "type": "real",
385
+ "primaryKey": false,
386
+ "notNull": false,
387
+ "autoincrement": false
388
+ },
389
+ "trace_id": {
390
+ "name": "trace_id",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": false,
394
+ "autoincrement": false
395
+ },
396
+ "created_at": {
397
+ "name": "created_at",
398
+ "type": "integer",
399
+ "primaryKey": false,
400
+ "notNull": true,
401
+ "autoincrement": false
402
+ },
403
+ "metadata": {
404
+ "name": "metadata",
405
+ "type": "text",
406
+ "primaryKey": false,
407
+ "notNull": false,
408
+ "autoincrement": false
409
+ }
410
+ },
411
+ "indexes": {},
412
+ "foreignKeys": {
413
+ "ai_usage_user_id_users_id_fk": {
414
+ "name": "ai_usage_user_id_users_id_fk",
415
+ "tableFrom": "ai_usage",
416
+ "tableTo": "users",
417
+ "columnsFrom": [
418
+ "user_id"
419
+ ],
420
+ "columnsTo": [
421
+ "id"
422
+ ],
423
+ "onDelete": "set null",
424
+ "onUpdate": "no action"
425
+ },
426
+ "ai_usage_member_id_members_id_fk": {
427
+ "name": "ai_usage_member_id_members_id_fk",
428
+ "tableFrom": "ai_usage",
429
+ "tableTo": "members",
430
+ "columnsFrom": [
431
+ "member_id"
432
+ ],
433
+ "columnsTo": [
434
+ "id"
435
+ ],
436
+ "onDelete": "set null",
437
+ "onUpdate": "no action"
438
+ },
439
+ "ai_usage_organization_id_organizations_id_fk": {
440
+ "name": "ai_usage_organization_id_organizations_id_fk",
441
+ "tableFrom": "ai_usage",
442
+ "tableTo": "organizations",
443
+ "columnsFrom": [
444
+ "organization_id"
445
+ ],
446
+ "columnsTo": [
447
+ "id"
448
+ ],
449
+ "onDelete": "set null",
450
+ "onUpdate": "no action"
451
+ }
452
+ },
453
+ "compositePrimaryKeys": {},
454
+ "uniqueConstraints": {},
455
+ "checkConstraints": {}
456
+ },
457
+ "apikeys": {
458
+ "name": "apikeys",
459
+ "columns": {
460
+ "id": {
461
+ "name": "id",
462
+ "type": "text",
463
+ "primaryKey": true,
464
+ "notNull": true,
465
+ "autoincrement": false
466
+ },
467
+ "name": {
468
+ "name": "name",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": false,
472
+ "autoincrement": false
473
+ },
474
+ "start": {
475
+ "name": "start",
476
+ "type": "text",
477
+ "primaryKey": false,
478
+ "notNull": false,
479
+ "autoincrement": false
480
+ },
481
+ "prefix": {
482
+ "name": "prefix",
483
+ "type": "text",
484
+ "primaryKey": false,
485
+ "notNull": false,
486
+ "autoincrement": false
487
+ },
488
+ "key": {
489
+ "name": "key",
490
+ "type": "text",
491
+ "primaryKey": false,
492
+ "notNull": true,
493
+ "autoincrement": false
494
+ },
495
+ "user_id": {
496
+ "name": "user_id",
497
+ "type": "text",
498
+ "primaryKey": false,
499
+ "notNull": true,
500
+ "autoincrement": false
501
+ },
502
+ "refill_interval": {
503
+ "name": "refill_interval",
504
+ "type": "integer",
505
+ "primaryKey": false,
506
+ "notNull": false,
507
+ "autoincrement": false
508
+ },
509
+ "refill_amount": {
510
+ "name": "refill_amount",
511
+ "type": "integer",
512
+ "primaryKey": false,
513
+ "notNull": false,
514
+ "autoincrement": false
515
+ },
516
+ "last_refill_at": {
517
+ "name": "last_refill_at",
518
+ "type": "integer",
519
+ "primaryKey": false,
520
+ "notNull": false,
521
+ "autoincrement": false
522
+ },
523
+ "enabled": {
524
+ "name": "enabled",
525
+ "type": "integer",
526
+ "primaryKey": false,
527
+ "notNull": true,
528
+ "autoincrement": false
529
+ },
530
+ "rate_limit_enabled": {
531
+ "name": "rate_limit_enabled",
532
+ "type": "integer",
533
+ "primaryKey": false,
534
+ "notNull": true,
535
+ "autoincrement": false
536
+ },
537
+ "rate_limit_time_window": {
538
+ "name": "rate_limit_time_window",
539
+ "type": "integer",
540
+ "primaryKey": false,
541
+ "notNull": false,
542
+ "autoincrement": false
543
+ },
544
+ "rate_limit_max": {
545
+ "name": "rate_limit_max",
546
+ "type": "integer",
547
+ "primaryKey": false,
548
+ "notNull": false,
549
+ "autoincrement": false
550
+ },
551
+ "request_count": {
552
+ "name": "request_count",
553
+ "type": "integer",
554
+ "primaryKey": false,
555
+ "notNull": true,
556
+ "autoincrement": false
557
+ },
558
+ "remaining": {
559
+ "name": "remaining",
560
+ "type": "integer",
561
+ "primaryKey": false,
562
+ "notNull": false,
563
+ "autoincrement": false
564
+ },
565
+ "last_request": {
566
+ "name": "last_request",
567
+ "type": "integer",
568
+ "primaryKey": false,
569
+ "notNull": false,
570
+ "autoincrement": false
571
+ },
572
+ "expires_at": {
573
+ "name": "expires_at",
574
+ "type": "integer",
575
+ "primaryKey": false,
576
+ "notNull": false,
577
+ "autoincrement": false
578
+ },
579
+ "created_at": {
580
+ "name": "created_at",
581
+ "type": "integer",
582
+ "primaryKey": false,
583
+ "notNull": true,
584
+ "autoincrement": false
585
+ },
586
+ "updated_at": {
587
+ "name": "updated_at",
588
+ "type": "integer",
589
+ "primaryKey": false,
590
+ "notNull": true,
591
+ "autoincrement": false
592
+ },
593
+ "permissions": {
594
+ "name": "permissions",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": false,
598
+ "autoincrement": false
599
+ },
600
+ "metadata": {
601
+ "name": "metadata",
602
+ "type": "text",
603
+ "primaryKey": false,
604
+ "notNull": false,
605
+ "autoincrement": false
606
+ }
607
+ },
608
+ "indexes": {},
609
+ "foreignKeys": {
610
+ "apikeys_user_id_users_id_fk": {
611
+ "name": "apikeys_user_id_users_id_fk",
612
+ "tableFrom": "apikeys",
613
+ "tableTo": "users",
614
+ "columnsFrom": [
615
+ "user_id"
616
+ ],
617
+ "columnsTo": [
618
+ "id"
619
+ ],
620
+ "onDelete": "no action",
621
+ "onUpdate": "no action"
622
+ }
623
+ },
624
+ "compositePrimaryKeys": {},
625
+ "uniqueConstraints": {},
626
+ "checkConstraints": {}
627
+ },
628
+ "chats": {
629
+ "name": "chats",
630
+ "columns": {
631
+ "id": {
632
+ "name": "id",
633
+ "type": "text",
634
+ "primaryKey": true,
635
+ "notNull": true,
636
+ "autoincrement": false
637
+ },
638
+ "user_id": {
639
+ "name": "user_id",
640
+ "type": "text",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "title": {
646
+ "name": "title",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": false,
650
+ "autoincrement": false
651
+ },
652
+ "type": {
653
+ "name": "type",
654
+ "type": "text",
655
+ "primaryKey": false,
656
+ "notNull": false,
657
+ "autoincrement": false
658
+ },
659
+ "conversation": {
660
+ "name": "conversation",
661
+ "type": "text",
662
+ "primaryKey": false,
663
+ "notNull": false,
664
+ "autoincrement": false
665
+ },
666
+ "created_at": {
667
+ "name": "created_at",
668
+ "type": "integer",
669
+ "primaryKey": false,
670
+ "notNull": false,
671
+ "autoincrement": false
672
+ },
673
+ "updated_at": {
674
+ "name": "updated_at",
675
+ "type": "integer",
676
+ "primaryKey": false,
677
+ "notNull": true,
678
+ "autoincrement": false
679
+ }
680
+ },
681
+ "indexes": {},
682
+ "foreignKeys": {
683
+ "chats_user_id_users_id_fk": {
684
+ "name": "chats_user_id_users_id_fk",
685
+ "tableFrom": "chats",
686
+ "tableTo": "users",
687
+ "columnsFrom": [
688
+ "user_id"
689
+ ],
690
+ "columnsTo": [
691
+ "id"
692
+ ],
693
+ "onDelete": "cascade",
694
+ "onUpdate": "no action"
695
+ }
696
+ },
697
+ "compositePrimaryKeys": {},
698
+ "uniqueConstraints": {},
699
+ "checkConstraints": {}
700
+ },
701
+ "files": {
702
+ "name": "files",
703
+ "columns": {
704
+ "id": {
705
+ "name": "id",
706
+ "type": "text",
707
+ "primaryKey": true,
708
+ "notNull": true,
709
+ "autoincrement": false
710
+ },
711
+ "created_at": {
712
+ "name": "created_at",
713
+ "type": "integer",
714
+ "primaryKey": false,
715
+ "notNull": true,
716
+ "autoincrement": false
717
+ },
718
+ "updated_at": {
719
+ "name": "updated_at",
720
+ "type": "integer",
721
+ "primaryKey": false,
722
+ "notNull": false,
723
+ "autoincrement": false
724
+ },
725
+ "deleted_at": {
726
+ "name": "deleted_at",
727
+ "type": "integer",
728
+ "primaryKey": false,
729
+ "notNull": false,
730
+ "autoincrement": false
731
+ },
732
+ "user_id": {
733
+ "name": "user_id",
734
+ "type": "text",
735
+ "primaryKey": false,
736
+ "notNull": false,
737
+ "autoincrement": false
738
+ },
739
+ "member_id": {
740
+ "name": "member_id",
741
+ "type": "text",
742
+ "primaryKey": false,
743
+ "notNull": false,
744
+ "autoincrement": false
745
+ },
746
+ "organization_id": {
747
+ "name": "organization_id",
748
+ "type": "text",
749
+ "primaryKey": false,
750
+ "notNull": false,
751
+ "autoincrement": false
752
+ },
753
+ "team_id": {
754
+ "name": "team_id",
755
+ "type": "text",
756
+ "primaryKey": false,
757
+ "notNull": false,
758
+ "autoincrement": false
759
+ },
760
+ "bucket": {
761
+ "name": "bucket",
762
+ "type": "text",
763
+ "primaryKey": false,
764
+ "notNull": true,
765
+ "autoincrement": false
766
+ },
767
+ "key": {
768
+ "name": "key",
769
+ "type": "text",
770
+ "primaryKey": false,
771
+ "notNull": true,
772
+ "autoincrement": false
773
+ },
774
+ "original_name": {
775
+ "name": "original_name",
776
+ "type": "text",
777
+ "primaryKey": false,
778
+ "notNull": true,
779
+ "autoincrement": false
780
+ },
781
+ "original_extension": {
782
+ "name": "original_extension",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": false,
786
+ "autoincrement": false
787
+ },
788
+ "content_type": {
789
+ "name": "content_type",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true,
793
+ "autoincrement": false
794
+ },
795
+ "size_bytes": {
796
+ "name": "size_bytes",
797
+ "type": "integer",
798
+ "primaryKey": false,
799
+ "notNull": false,
800
+ "autoincrement": false
801
+ },
802
+ "etag": {
803
+ "name": "etag",
804
+ "type": "text",
805
+ "primaryKey": false,
806
+ "notNull": false,
807
+ "autoincrement": false
808
+ },
809
+ "checksum_sha256": {
810
+ "name": "checksum_sha256",
811
+ "type": "text",
812
+ "primaryKey": false,
813
+ "notNull": false,
814
+ "autoincrement": false
815
+ },
816
+ "metadata": {
817
+ "name": "metadata",
818
+ "type": "text",
819
+ "primaryKey": false,
820
+ "notNull": false,
821
+ "autoincrement": false
822
+ },
823
+ "status": {
824
+ "name": "status",
825
+ "type": "text",
826
+ "primaryKey": false,
827
+ "notNull": true,
828
+ "autoincrement": false
829
+ },
830
+ "uploaded_at": {
831
+ "name": "uploaded_at",
832
+ "type": "integer",
833
+ "primaryKey": false,
834
+ "notNull": false,
835
+ "autoincrement": false
836
+ }
837
+ },
838
+ "indexes": {
839
+ "files_bucket_key_unique": {
840
+ "name": "files_bucket_key_unique",
841
+ "columns": [
842
+ "bucket",
843
+ "key"
844
+ ],
845
+ "isUnique": true
846
+ }
847
+ },
848
+ "foreignKeys": {
849
+ "files_user_id_users_id_fk": {
850
+ "name": "files_user_id_users_id_fk",
851
+ "tableFrom": "files",
852
+ "tableTo": "users",
853
+ "columnsFrom": [
854
+ "user_id"
855
+ ],
856
+ "columnsTo": [
857
+ "id"
858
+ ],
859
+ "onDelete": "set null",
860
+ "onUpdate": "no action"
861
+ },
862
+ "files_member_id_members_id_fk": {
863
+ "name": "files_member_id_members_id_fk",
864
+ "tableFrom": "files",
865
+ "tableTo": "members",
866
+ "columnsFrom": [
867
+ "member_id"
868
+ ],
869
+ "columnsTo": [
870
+ "id"
871
+ ],
872
+ "onDelete": "set null",
873
+ "onUpdate": "no action"
874
+ },
875
+ "files_organization_id_organizations_id_fk": {
876
+ "name": "files_organization_id_organizations_id_fk",
877
+ "tableFrom": "files",
878
+ "tableTo": "organizations",
879
+ "columnsFrom": [
880
+ "organization_id"
881
+ ],
882
+ "columnsTo": [
883
+ "id"
884
+ ],
885
+ "onDelete": "set null",
886
+ "onUpdate": "no action"
887
+ }
888
+ },
889
+ "compositePrimaryKeys": {},
890
+ "uniqueConstraints": {},
891
+ "checkConstraints": {}
892
+ },
893
+ "invitations": {
894
+ "name": "invitations",
895
+ "columns": {
896
+ "id": {
897
+ "name": "id",
898
+ "type": "text",
899
+ "primaryKey": true,
900
+ "notNull": true,
901
+ "autoincrement": false
902
+ },
903
+ "organization_id": {
904
+ "name": "organization_id",
905
+ "type": "text",
906
+ "primaryKey": false,
907
+ "notNull": true,
908
+ "autoincrement": false
909
+ },
910
+ "member_id": {
911
+ "name": "member_id",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": false,
915
+ "autoincrement": false
916
+ },
917
+ "email": {
918
+ "name": "email",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "autoincrement": false
923
+ },
924
+ "role": {
925
+ "name": "role",
926
+ "type": "text",
927
+ "primaryKey": false,
928
+ "notNull": false,
929
+ "autoincrement": false
930
+ },
931
+ "status": {
932
+ "name": "status",
933
+ "type": "text",
934
+ "primaryKey": false,
935
+ "notNull": true,
936
+ "autoincrement": false
937
+ },
938
+ "created_at": {
939
+ "name": "created_at",
940
+ "type": "integer",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "autoincrement": false
944
+ },
945
+ "expires_at": {
946
+ "name": "expires_at",
947
+ "type": "integer",
948
+ "primaryKey": false,
949
+ "notNull": true,
950
+ "autoincrement": false
951
+ },
952
+ "inviter_id": {
953
+ "name": "inviter_id",
954
+ "type": "text",
955
+ "primaryKey": false,
956
+ "notNull": true,
957
+ "autoincrement": false
958
+ }
959
+ },
960
+ "indexes": {},
961
+ "foreignKeys": {
962
+ "invitations_organization_id_organizations_id_fk": {
963
+ "name": "invitations_organization_id_organizations_id_fk",
964
+ "tableFrom": "invitations",
965
+ "tableTo": "organizations",
966
+ "columnsFrom": [
967
+ "organization_id"
968
+ ],
969
+ "columnsTo": [
970
+ "id"
971
+ ],
972
+ "onDelete": "no action",
973
+ "onUpdate": "no action"
974
+ },
975
+ "invitations_member_id_members_id_fk": {
976
+ "name": "invitations_member_id_members_id_fk",
977
+ "tableFrom": "invitations",
978
+ "tableTo": "members",
979
+ "columnsFrom": [
980
+ "member_id"
981
+ ],
982
+ "columnsTo": [
983
+ "id"
984
+ ],
985
+ "onDelete": "no action",
986
+ "onUpdate": "no action"
987
+ },
988
+ "invitations_inviter_id_users_id_fk": {
989
+ "name": "invitations_inviter_id_users_id_fk",
990
+ "tableFrom": "invitations",
991
+ "tableTo": "users",
992
+ "columnsFrom": [
993
+ "inviter_id"
994
+ ],
995
+ "columnsTo": [
996
+ "id"
997
+ ],
998
+ "onDelete": "no action",
999
+ "onUpdate": "no action"
1000
+ }
1001
+ },
1002
+ "compositePrimaryKeys": {},
1003
+ "uniqueConstraints": {},
1004
+ "checkConstraints": {}
1005
+ },
1006
+ "members": {
1007
+ "name": "members",
1008
+ "columns": {
1009
+ "id": {
1010
+ "name": "id",
1011
+ "type": "text",
1012
+ "primaryKey": true,
1013
+ "notNull": true,
1014
+ "autoincrement": false
1015
+ },
1016
+ "organization_id": {
1017
+ "name": "organization_id",
1018
+ "type": "text",
1019
+ "primaryKey": false,
1020
+ "notNull": true,
1021
+ "autoincrement": false
1022
+ },
1023
+ "user_id": {
1024
+ "name": "user_id",
1025
+ "type": "text",
1026
+ "primaryKey": false,
1027
+ "notNull": false,
1028
+ "autoincrement": false
1029
+ },
1030
+ "email": {
1031
+ "name": "email",
1032
+ "type": "text",
1033
+ "primaryKey": false,
1034
+ "notNull": false,
1035
+ "autoincrement": false
1036
+ },
1037
+ "name": {
1038
+ "name": "name",
1039
+ "type": "text",
1040
+ "primaryKey": false,
1041
+ "notNull": true,
1042
+ "autoincrement": false,
1043
+ "default": "''"
1044
+ },
1045
+ "image": {
1046
+ "name": "image",
1047
+ "type": "text",
1048
+ "primaryKey": false,
1049
+ "notNull": false,
1050
+ "autoincrement": false
1051
+ },
1052
+ "role": {
1053
+ "name": "role",
1054
+ "type": "text",
1055
+ "primaryKey": false,
1056
+ "notNull": true,
1057
+ "autoincrement": false
1058
+ },
1059
+ "created_at": {
1060
+ "name": "created_at",
1061
+ "type": "integer",
1062
+ "primaryKey": false,
1063
+ "notNull": true,
1064
+ "autoincrement": false
1065
+ },
1066
+ "deleted_at": {
1067
+ "name": "deleted_at",
1068
+ "type": "integer",
1069
+ "primaryKey": false,
1070
+ "notNull": false,
1071
+ "autoincrement": false
1072
+ },
1073
+ "preferences": {
1074
+ "name": "preferences",
1075
+ "type": "text",
1076
+ "primaryKey": false,
1077
+ "notNull": false,
1078
+ "autoincrement": false,
1079
+ "default": "'{}'"
1080
+ },
1081
+ "metadata": {
1082
+ "name": "metadata",
1083
+ "type": "text",
1084
+ "primaryKey": false,
1085
+ "notNull": false,
1086
+ "autoincrement": false,
1087
+ "default": "'{}'"
1088
+ },
1089
+ "onboarding": {
1090
+ "name": "onboarding",
1091
+ "type": "integer",
1092
+ "primaryKey": false,
1093
+ "notNull": false,
1094
+ "autoincrement": false
1095
+ },
1096
+ "flags": {
1097
+ "name": "flags",
1098
+ "type": "text",
1099
+ "primaryKey": false,
1100
+ "notNull": false,
1101
+ "autoincrement": false,
1102
+ "default": "'[]'"
1103
+ }
1104
+ },
1105
+ "indexes": {
1106
+ "members_attached_user_organization_unique": {
1107
+ "name": "members_attached_user_organization_unique",
1108
+ "columns": [
1109
+ "user_id",
1110
+ "organization_id"
1111
+ ],
1112
+ "isUnique": true,
1113
+ "where": "\"members\".\"user_id\" is not null"
1114
+ },
1115
+ "members_live_pending_email_organization_unique": {
1116
+ "name": "members_live_pending_email_organization_unique",
1117
+ "columns": [
1118
+ "email",
1119
+ "organization_id"
1120
+ ],
1121
+ "isUnique": true,
1122
+ "where": "\"members\".\"user_id\" is null and \"members\".\"deleted_at\" is null"
1123
+ }
1124
+ },
1125
+ "foreignKeys": {
1126
+ "members_organization_id_organizations_id_fk": {
1127
+ "name": "members_organization_id_organizations_id_fk",
1128
+ "tableFrom": "members",
1129
+ "tableTo": "organizations",
1130
+ "columnsFrom": [
1131
+ "organization_id"
1132
+ ],
1133
+ "columnsTo": [
1134
+ "id"
1135
+ ],
1136
+ "onDelete": "no action",
1137
+ "onUpdate": "no action"
1138
+ },
1139
+ "members_user_id_users_id_fk": {
1140
+ "name": "members_user_id_users_id_fk",
1141
+ "tableFrom": "members",
1142
+ "tableTo": "users",
1143
+ "columnsFrom": [
1144
+ "user_id"
1145
+ ],
1146
+ "columnsTo": [
1147
+ "id"
1148
+ ],
1149
+ "onDelete": "no action",
1150
+ "onUpdate": "no action"
1151
+ }
1152
+ },
1153
+ "compositePrimaryKeys": {},
1154
+ "uniqueConstraints": {},
1155
+ "checkConstraints": {}
1156
+ },
1157
+ "notification_devices": {
1158
+ "name": "notification_devices",
1159
+ "columns": {
1160
+ "id": {
1161
+ "name": "id",
1162
+ "type": "text",
1163
+ "primaryKey": true,
1164
+ "notNull": true,
1165
+ "autoincrement": false
1166
+ },
1167
+ "user_id": {
1168
+ "name": "user_id",
1169
+ "type": "text",
1170
+ "primaryKey": false,
1171
+ "notNull": true,
1172
+ "autoincrement": false
1173
+ },
1174
+ "platform": {
1175
+ "name": "platform",
1176
+ "type": "text",
1177
+ "primaryKey": false,
1178
+ "notNull": true,
1179
+ "autoincrement": false
1180
+ },
1181
+ "endpoint": {
1182
+ "name": "endpoint",
1183
+ "type": "text",
1184
+ "primaryKey": false,
1185
+ "notNull": false,
1186
+ "autoincrement": false
1187
+ },
1188
+ "subscription": {
1189
+ "name": "subscription",
1190
+ "type": "text",
1191
+ "primaryKey": false,
1192
+ "notNull": false,
1193
+ "autoincrement": false
1194
+ },
1195
+ "token": {
1196
+ "name": "token",
1197
+ "type": "text",
1198
+ "primaryKey": false,
1199
+ "notNull": false,
1200
+ "autoincrement": false
1201
+ },
1202
+ "label": {
1203
+ "name": "label",
1204
+ "type": "text",
1205
+ "primaryKey": false,
1206
+ "notNull": false,
1207
+ "autoincrement": false
1208
+ },
1209
+ "enabled": {
1210
+ "name": "enabled",
1211
+ "type": "integer",
1212
+ "primaryKey": false,
1213
+ "notNull": true,
1214
+ "autoincrement": false,
1215
+ "default": true
1216
+ },
1217
+ "created_at": {
1218
+ "name": "created_at",
1219
+ "type": "integer",
1220
+ "primaryKey": false,
1221
+ "notNull": true,
1222
+ "autoincrement": false
1223
+ },
1224
+ "updated_at": {
1225
+ "name": "updated_at",
1226
+ "type": "integer",
1227
+ "primaryKey": false,
1228
+ "notNull": true,
1229
+ "autoincrement": false
1230
+ }
1231
+ },
1232
+ "indexes": {
1233
+ "notification_devices_endpoint_unique": {
1234
+ "name": "notification_devices_endpoint_unique",
1235
+ "columns": [
1236
+ "endpoint"
1237
+ ],
1238
+ "isUnique": true
1239
+ },
1240
+ "notification_devices_token_unique": {
1241
+ "name": "notification_devices_token_unique",
1242
+ "columns": [
1243
+ "token"
1244
+ ],
1245
+ "isUnique": true
1246
+ }
1247
+ },
1248
+ "foreignKeys": {
1249
+ "notification_devices_user_id_users_id_fk": {
1250
+ "name": "notification_devices_user_id_users_id_fk",
1251
+ "tableFrom": "notification_devices",
1252
+ "tableTo": "users",
1253
+ "columnsFrom": [
1254
+ "user_id"
1255
+ ],
1256
+ "columnsTo": [
1257
+ "id"
1258
+ ],
1259
+ "onDelete": "cascade",
1260
+ "onUpdate": "no action"
1261
+ }
1262
+ },
1263
+ "compositePrimaryKeys": {},
1264
+ "uniqueConstraints": {},
1265
+ "checkConstraints": {}
1266
+ },
1267
+ "notification_preferences": {
1268
+ "name": "notification_preferences",
1269
+ "columns": {
1270
+ "id": {
1271
+ "name": "id",
1272
+ "type": "text",
1273
+ "primaryKey": true,
1274
+ "notNull": true,
1275
+ "autoincrement": false
1276
+ },
1277
+ "member_id": {
1278
+ "name": "member_id",
1279
+ "type": "text",
1280
+ "primaryKey": false,
1281
+ "notNull": true,
1282
+ "autoincrement": false
1283
+ },
1284
+ "kind": {
1285
+ "name": "kind",
1286
+ "type": "text",
1287
+ "primaryKey": false,
1288
+ "notNull": true,
1289
+ "autoincrement": false
1290
+ },
1291
+ "channel": {
1292
+ "name": "channel",
1293
+ "type": "text",
1294
+ "primaryKey": false,
1295
+ "notNull": true,
1296
+ "autoincrement": false
1297
+ },
1298
+ "created_at": {
1299
+ "name": "created_at",
1300
+ "type": "integer",
1301
+ "primaryKey": false,
1302
+ "notNull": true,
1303
+ "autoincrement": false
1304
+ },
1305
+ "updated_at": {
1306
+ "name": "updated_at",
1307
+ "type": "integer",
1308
+ "primaryKey": false,
1309
+ "notNull": true,
1310
+ "autoincrement": false
1311
+ }
1312
+ },
1313
+ "indexes": {
1314
+ "notification_preferences_member_kind_channel_unique": {
1315
+ "name": "notification_preferences_member_kind_channel_unique",
1316
+ "columns": [
1317
+ "member_id",
1318
+ "kind",
1319
+ "channel"
1320
+ ],
1321
+ "isUnique": true
1322
+ }
1323
+ },
1324
+ "foreignKeys": {
1325
+ "notification_preferences_member_id_members_id_fk": {
1326
+ "name": "notification_preferences_member_id_members_id_fk",
1327
+ "tableFrom": "notification_preferences",
1328
+ "tableTo": "members",
1329
+ "columnsFrom": [
1330
+ "member_id"
1331
+ ],
1332
+ "columnsTo": [
1333
+ "id"
1334
+ ],
1335
+ "onDelete": "cascade",
1336
+ "onUpdate": "no action"
1337
+ }
1338
+ },
1339
+ "compositePrimaryKeys": {},
1340
+ "uniqueConstraints": {},
1341
+ "checkConstraints": {}
1342
+ },
1343
+ "notification_send_logs": {
1344
+ "name": "notification_send_logs",
1345
+ "columns": {
1346
+ "id": {
1347
+ "name": "id",
1348
+ "type": "text",
1349
+ "primaryKey": true,
1350
+ "notNull": true,
1351
+ "autoincrement": false
1352
+ },
1353
+ "batch_id": {
1354
+ "name": "batch_id",
1355
+ "type": "text",
1356
+ "primaryKey": false,
1357
+ "notNull": true,
1358
+ "autoincrement": false
1359
+ },
1360
+ "notification_id": {
1361
+ "name": "notification_id",
1362
+ "type": "text",
1363
+ "primaryKey": false,
1364
+ "notNull": true,
1365
+ "autoincrement": false
1366
+ },
1367
+ "user_id": {
1368
+ "name": "user_id",
1369
+ "type": "text",
1370
+ "primaryKey": false,
1371
+ "notNull": true,
1372
+ "autoincrement": false
1373
+ },
1374
+ "device_id": {
1375
+ "name": "device_id",
1376
+ "type": "text",
1377
+ "primaryKey": false,
1378
+ "notNull": false,
1379
+ "autoincrement": false
1380
+ },
1381
+ "channel": {
1382
+ "name": "channel",
1383
+ "type": "text",
1384
+ "primaryKey": false,
1385
+ "notNull": true,
1386
+ "autoincrement": false
1387
+ },
1388
+ "provider": {
1389
+ "name": "provider",
1390
+ "type": "text",
1391
+ "primaryKey": false,
1392
+ "notNull": false,
1393
+ "autoincrement": false
1394
+ },
1395
+ "title": {
1396
+ "name": "title",
1397
+ "type": "text",
1398
+ "primaryKey": false,
1399
+ "notNull": true,
1400
+ "autoincrement": false
1401
+ },
1402
+ "body": {
1403
+ "name": "body",
1404
+ "type": "text",
1405
+ "primaryKey": false,
1406
+ "notNull": true,
1407
+ "autoincrement": false
1408
+ },
1409
+ "data": {
1410
+ "name": "data",
1411
+ "type": "text",
1412
+ "primaryKey": false,
1413
+ "notNull": false,
1414
+ "autoincrement": false
1415
+ },
1416
+ "status": {
1417
+ "name": "status",
1418
+ "type": "text",
1419
+ "primaryKey": false,
1420
+ "notNull": true,
1421
+ "autoincrement": false
1422
+ },
1423
+ "error": {
1424
+ "name": "error",
1425
+ "type": "text",
1426
+ "primaryKey": false,
1427
+ "notNull": false,
1428
+ "autoincrement": false
1429
+ },
1430
+ "job_id": {
1431
+ "name": "job_id",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": false,
1435
+ "autoincrement": false
1436
+ },
1437
+ "created_at": {
1438
+ "name": "created_at",
1439
+ "type": "integer",
1440
+ "primaryKey": false,
1441
+ "notNull": true,
1442
+ "autoincrement": false
1443
+ },
1444
+ "updated_at": {
1445
+ "name": "updated_at",
1446
+ "type": "integer",
1447
+ "primaryKey": false,
1448
+ "notNull": true,
1449
+ "autoincrement": false
1450
+ }
1451
+ },
1452
+ "indexes": {},
1453
+ "foreignKeys": {
1454
+ "notification_send_logs_notification_id_notifications_id_fk": {
1455
+ "name": "notification_send_logs_notification_id_notifications_id_fk",
1456
+ "tableFrom": "notification_send_logs",
1457
+ "tableTo": "notifications",
1458
+ "columnsFrom": [
1459
+ "notification_id"
1460
+ ],
1461
+ "columnsTo": [
1462
+ "id"
1463
+ ],
1464
+ "onDelete": "cascade",
1465
+ "onUpdate": "no action"
1466
+ },
1467
+ "notification_send_logs_user_id_users_id_fk": {
1468
+ "name": "notification_send_logs_user_id_users_id_fk",
1469
+ "tableFrom": "notification_send_logs",
1470
+ "tableTo": "users",
1471
+ "columnsFrom": [
1472
+ "user_id"
1473
+ ],
1474
+ "columnsTo": [
1475
+ "id"
1476
+ ],
1477
+ "onDelete": "cascade",
1478
+ "onUpdate": "no action"
1479
+ },
1480
+ "notification_send_logs_device_id_notification_devices_id_fk": {
1481
+ "name": "notification_send_logs_device_id_notification_devices_id_fk",
1482
+ "tableFrom": "notification_send_logs",
1483
+ "tableTo": "notification_devices",
1484
+ "columnsFrom": [
1485
+ "device_id"
1486
+ ],
1487
+ "columnsTo": [
1488
+ "id"
1489
+ ],
1490
+ "onDelete": "set null",
1491
+ "onUpdate": "no action"
1492
+ }
1493
+ },
1494
+ "compositePrimaryKeys": {},
1495
+ "uniqueConstraints": {},
1496
+ "checkConstraints": {}
1497
+ },
1498
+ "notifications": {
1499
+ "name": "notifications",
1500
+ "columns": {
1501
+ "id": {
1502
+ "name": "id",
1503
+ "type": "text",
1504
+ "primaryKey": true,
1505
+ "notNull": true,
1506
+ "autoincrement": false
1507
+ },
1508
+ "member_id": {
1509
+ "name": "member_id",
1510
+ "type": "text",
1511
+ "primaryKey": false,
1512
+ "notNull": true,
1513
+ "autoincrement": false
1514
+ },
1515
+ "user_id": {
1516
+ "name": "user_id",
1517
+ "type": "text",
1518
+ "primaryKey": false,
1519
+ "notNull": true,
1520
+ "autoincrement": false
1521
+ },
1522
+ "kind": {
1523
+ "name": "kind",
1524
+ "type": "text",
1525
+ "primaryKey": false,
1526
+ "notNull": true,
1527
+ "autoincrement": false
1528
+ },
1529
+ "title": {
1530
+ "name": "title",
1531
+ "type": "text",
1532
+ "primaryKey": false,
1533
+ "notNull": true,
1534
+ "autoincrement": false
1535
+ },
1536
+ "body": {
1537
+ "name": "body",
1538
+ "type": "text",
1539
+ "primaryKey": false,
1540
+ "notNull": true,
1541
+ "autoincrement": false
1542
+ },
1543
+ "data": {
1544
+ "name": "data",
1545
+ "type": "text",
1546
+ "primaryKey": false,
1547
+ "notNull": false,
1548
+ "autoincrement": false
1549
+ },
1550
+ "visible_in_inbox": {
1551
+ "name": "visible_in_inbox",
1552
+ "type": "integer",
1553
+ "primaryKey": false,
1554
+ "notNull": true,
1555
+ "autoincrement": false,
1556
+ "default": false
1557
+ },
1558
+ "armed_channels": {
1559
+ "name": "armed_channels",
1560
+ "type": "text",
1561
+ "primaryKey": false,
1562
+ "notNull": true,
1563
+ "autoincrement": false,
1564
+ "default": "'[]'"
1565
+ },
1566
+ "web_pushed_at": {
1567
+ "name": "web_pushed_at",
1568
+ "type": "integer",
1569
+ "primaryKey": false,
1570
+ "notNull": false,
1571
+ "autoincrement": false
1572
+ },
1573
+ "mobile_pushed_at": {
1574
+ "name": "mobile_pushed_at",
1575
+ "type": "integer",
1576
+ "primaryKey": false,
1577
+ "notNull": false,
1578
+ "autoincrement": false
1579
+ },
1580
+ "emailed_at": {
1581
+ "name": "emailed_at",
1582
+ "type": "integer",
1583
+ "primaryKey": false,
1584
+ "notNull": false,
1585
+ "autoincrement": false
1586
+ },
1587
+ "read_at": {
1588
+ "name": "read_at",
1589
+ "type": "integer",
1590
+ "primaryKey": false,
1591
+ "notNull": false,
1592
+ "autoincrement": false
1593
+ },
1594
+ "created_at": {
1595
+ "name": "created_at",
1596
+ "type": "integer",
1597
+ "primaryKey": false,
1598
+ "notNull": true,
1599
+ "autoincrement": false
1600
+ },
1601
+ "updated_at": {
1602
+ "name": "updated_at",
1603
+ "type": "integer",
1604
+ "primaryKey": false,
1605
+ "notNull": true,
1606
+ "autoincrement": false
1607
+ }
1608
+ },
1609
+ "indexes": {},
1610
+ "foreignKeys": {
1611
+ "notifications_member_id_members_id_fk": {
1612
+ "name": "notifications_member_id_members_id_fk",
1613
+ "tableFrom": "notifications",
1614
+ "tableTo": "members",
1615
+ "columnsFrom": [
1616
+ "member_id"
1617
+ ],
1618
+ "columnsTo": [
1619
+ "id"
1620
+ ],
1621
+ "onDelete": "cascade",
1622
+ "onUpdate": "no action"
1623
+ },
1624
+ "notifications_user_id_users_id_fk": {
1625
+ "name": "notifications_user_id_users_id_fk",
1626
+ "tableFrom": "notifications",
1627
+ "tableTo": "users",
1628
+ "columnsFrom": [
1629
+ "user_id"
1630
+ ],
1631
+ "columnsTo": [
1632
+ "id"
1633
+ ],
1634
+ "onDelete": "cascade",
1635
+ "onUpdate": "no action"
1636
+ }
1637
+ },
1638
+ "compositePrimaryKeys": {},
1639
+ "uniqueConstraints": {},
1640
+ "checkConstraints": {}
1641
+ },
1642
+ "organizations": {
1643
+ "name": "organizations",
1644
+ "columns": {
1645
+ "id": {
1646
+ "name": "id",
1647
+ "type": "text",
1648
+ "primaryKey": true,
1649
+ "notNull": true,
1650
+ "autoincrement": false
1651
+ },
1652
+ "name": {
1653
+ "name": "name",
1654
+ "type": "text",
1655
+ "primaryKey": false,
1656
+ "notNull": true,
1657
+ "autoincrement": false
1658
+ },
1659
+ "slug": {
1660
+ "name": "slug",
1661
+ "type": "text",
1662
+ "primaryKey": false,
1663
+ "notNull": false,
1664
+ "autoincrement": false
1665
+ },
1666
+ "logo": {
1667
+ "name": "logo",
1668
+ "type": "text",
1669
+ "primaryKey": false,
1670
+ "notNull": false,
1671
+ "autoincrement": false
1672
+ },
1673
+ "type": {
1674
+ "name": "type",
1675
+ "type": "text",
1676
+ "primaryKey": false,
1677
+ "notNull": false,
1678
+ "autoincrement": false
1679
+ },
1680
+ "parent_id": {
1681
+ "name": "parent_id",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": false,
1685
+ "autoincrement": false
1686
+ },
1687
+ "created_at": {
1688
+ "name": "created_at",
1689
+ "type": "integer",
1690
+ "primaryKey": false,
1691
+ "notNull": true,
1692
+ "autoincrement": false
1693
+ },
1694
+ "onboarding": {
1695
+ "name": "onboarding",
1696
+ "type": "integer",
1697
+ "primaryKey": false,
1698
+ "notNull": false,
1699
+ "autoincrement": false
1700
+ },
1701
+ "preferences": {
1702
+ "name": "preferences",
1703
+ "type": "text",
1704
+ "primaryKey": false,
1705
+ "notNull": false,
1706
+ "autoincrement": false,
1707
+ "default": "'{}'"
1708
+ },
1709
+ "metadata": {
1710
+ "name": "metadata",
1711
+ "type": "text",
1712
+ "primaryKey": false,
1713
+ "notNull": false,
1714
+ "autoincrement": false,
1715
+ "default": "'{}'"
1716
+ },
1717
+ "flags": {
1718
+ "name": "flags",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": false,
1722
+ "autoincrement": false,
1723
+ "default": "'[]'"
1724
+ },
1725
+ "locale": {
1726
+ "name": "locale",
1727
+ "type": "text",
1728
+ "primaryKey": false,
1729
+ "notNull": false,
1730
+ "autoincrement": false
1731
+ }
1732
+ },
1733
+ "indexes": {
1734
+ "organizations_slug_unique": {
1735
+ "name": "organizations_slug_unique",
1736
+ "columns": [
1737
+ "slug"
1738
+ ],
1739
+ "isUnique": true
1740
+ }
1741
+ },
1742
+ "foreignKeys": {
1743
+ "organizations_parent_id_organizations_id_fk": {
1744
+ "name": "organizations_parent_id_organizations_id_fk",
1745
+ "tableFrom": "organizations",
1746
+ "tableTo": "organizations",
1747
+ "columnsFrom": [
1748
+ "parent_id"
1749
+ ],
1750
+ "columnsTo": [
1751
+ "id"
1752
+ ],
1753
+ "onDelete": "set null",
1754
+ "onUpdate": "no action"
1755
+ }
1756
+ },
1757
+ "compositePrimaryKeys": {},
1758
+ "uniqueConstraints": {},
1759
+ "checkConstraints": {}
1760
+ },
1761
+ "posts": {
1762
+ "name": "posts",
1763
+ "columns": {
1764
+ "id": {
1765
+ "name": "id",
1766
+ "type": "text",
1767
+ "primaryKey": true,
1768
+ "notNull": true,
1769
+ "autoincrement": false
1770
+ },
1771
+ "author_user_id": {
1772
+ "name": "author_user_id",
1773
+ "type": "text",
1774
+ "primaryKey": false,
1775
+ "notNull": false,
1776
+ "autoincrement": false
1777
+ },
1778
+ "member_id": {
1779
+ "name": "member_id",
1780
+ "type": "text",
1781
+ "primaryKey": false,
1782
+ "notNull": false,
1783
+ "autoincrement": false
1784
+ },
1785
+ "organization_id": {
1786
+ "name": "organization_id",
1787
+ "type": "text",
1788
+ "primaryKey": false,
1789
+ "notNull": false,
1790
+ "autoincrement": false
1791
+ },
1792
+ "team_id": {
1793
+ "name": "team_id",
1794
+ "type": "text",
1795
+ "primaryKey": false,
1796
+ "notNull": false,
1797
+ "autoincrement": false
1798
+ },
1799
+ "title": {
1800
+ "name": "title",
1801
+ "type": "text",
1802
+ "primaryKey": false,
1803
+ "notNull": true,
1804
+ "autoincrement": false
1805
+ },
1806
+ "slug": {
1807
+ "name": "slug",
1808
+ "type": "text",
1809
+ "primaryKey": false,
1810
+ "notNull": true,
1811
+ "autoincrement": false
1812
+ },
1813
+ "excerpt": {
1814
+ "name": "excerpt",
1815
+ "type": "text",
1816
+ "primaryKey": false,
1817
+ "notNull": false,
1818
+ "autoincrement": false
1819
+ },
1820
+ "content": {
1821
+ "name": "content",
1822
+ "type": "text",
1823
+ "primaryKey": false,
1824
+ "notNull": true,
1825
+ "autoincrement": false
1826
+ },
1827
+ "status": {
1828
+ "name": "status",
1829
+ "type": "text",
1830
+ "primaryKey": false,
1831
+ "notNull": true,
1832
+ "autoincrement": false,
1833
+ "default": "'draft'"
1834
+ },
1835
+ "published_at": {
1836
+ "name": "published_at",
1837
+ "type": "integer",
1838
+ "primaryKey": false,
1839
+ "notNull": false,
1840
+ "autoincrement": false
1841
+ },
1842
+ "created_at": {
1843
+ "name": "created_at",
1844
+ "type": "integer",
1845
+ "primaryKey": false,
1846
+ "notNull": true,
1847
+ "autoincrement": false
1848
+ },
1849
+ "updated_at": {
1850
+ "name": "updated_at",
1851
+ "type": "integer",
1852
+ "primaryKey": false,
1853
+ "notNull": false,
1854
+ "autoincrement": false
1855
+ },
1856
+ "deleted_at": {
1857
+ "name": "deleted_at",
1858
+ "type": "integer",
1859
+ "primaryKey": false,
1860
+ "notNull": false,
1861
+ "autoincrement": false
1862
+ }
1863
+ },
1864
+ "indexes": {
1865
+ "posts_slug_unique": {
1866
+ "name": "posts_slug_unique",
1867
+ "columns": [
1868
+ "slug"
1869
+ ],
1870
+ "isUnique": true
1871
+ }
1872
+ },
1873
+ "foreignKeys": {
1874
+ "posts_author_user_id_users_id_fk": {
1875
+ "name": "posts_author_user_id_users_id_fk",
1876
+ "tableFrom": "posts",
1877
+ "tableTo": "users",
1878
+ "columnsFrom": [
1879
+ "author_user_id"
1880
+ ],
1881
+ "columnsTo": [
1882
+ "id"
1883
+ ],
1884
+ "onDelete": "set null",
1885
+ "onUpdate": "no action"
1886
+ },
1887
+ "posts_member_id_members_id_fk": {
1888
+ "name": "posts_member_id_members_id_fk",
1889
+ "tableFrom": "posts",
1890
+ "tableTo": "members",
1891
+ "columnsFrom": [
1892
+ "member_id"
1893
+ ],
1894
+ "columnsTo": [
1895
+ "id"
1896
+ ],
1897
+ "onDelete": "set null",
1898
+ "onUpdate": "no action"
1899
+ },
1900
+ "posts_organization_id_organizations_id_fk": {
1901
+ "name": "posts_organization_id_organizations_id_fk",
1902
+ "tableFrom": "posts",
1903
+ "tableTo": "organizations",
1904
+ "columnsFrom": [
1905
+ "organization_id"
1906
+ ],
1907
+ "columnsTo": [
1908
+ "id"
1909
+ ],
1910
+ "onDelete": "set null",
1911
+ "onUpdate": "no action"
1912
+ }
1913
+ },
1914
+ "compositePrimaryKeys": {},
1915
+ "uniqueConstraints": {},
1916
+ "checkConstraints": {}
1917
+ },
1918
+ "sessions": {
1919
+ "name": "sessions",
1920
+ "columns": {
1921
+ "id": {
1922
+ "name": "id",
1923
+ "type": "text",
1924
+ "primaryKey": true,
1925
+ "notNull": true,
1926
+ "autoincrement": false
1927
+ },
1928
+ "expires_at": {
1929
+ "name": "expires_at",
1930
+ "type": "integer",
1931
+ "primaryKey": false,
1932
+ "notNull": true,
1933
+ "autoincrement": false
1934
+ },
1935
+ "token": {
1936
+ "name": "token",
1937
+ "type": "text",
1938
+ "primaryKey": false,
1939
+ "notNull": true,
1940
+ "autoincrement": false
1941
+ },
1942
+ "created_at": {
1943
+ "name": "created_at",
1944
+ "type": "integer",
1945
+ "primaryKey": false,
1946
+ "notNull": true,
1947
+ "autoincrement": false
1948
+ },
1949
+ "updated_at": {
1950
+ "name": "updated_at",
1951
+ "type": "integer",
1952
+ "primaryKey": false,
1953
+ "notNull": true,
1954
+ "autoincrement": false
1955
+ },
1956
+ "ip_address": {
1957
+ "name": "ip_address",
1958
+ "type": "text",
1959
+ "primaryKey": false,
1960
+ "notNull": false,
1961
+ "autoincrement": false
1962
+ },
1963
+ "user_agent": {
1964
+ "name": "user_agent",
1965
+ "type": "text",
1966
+ "primaryKey": false,
1967
+ "notNull": false,
1968
+ "autoincrement": false
1969
+ },
1970
+ "user_id": {
1971
+ "name": "user_id",
1972
+ "type": "text",
1973
+ "primaryKey": false,
1974
+ "notNull": true,
1975
+ "autoincrement": false
1976
+ },
1977
+ "impersonated_by": {
1978
+ "name": "impersonated_by",
1979
+ "type": "text",
1980
+ "primaryKey": false,
1981
+ "notNull": false,
1982
+ "autoincrement": false
1983
+ },
1984
+ "active_organization_id": {
1985
+ "name": "active_organization_id",
1986
+ "type": "text",
1987
+ "primaryKey": false,
1988
+ "notNull": false,
1989
+ "autoincrement": false
1990
+ },
1991
+ "active_organization_member_id": {
1992
+ "name": "active_organization_member_id",
1993
+ "type": "text",
1994
+ "primaryKey": false,
1995
+ "notNull": false,
1996
+ "autoincrement": false
1997
+ },
1998
+ "active_organization_role": {
1999
+ "name": "active_organization_role",
2000
+ "type": "text",
2001
+ "primaryKey": false,
2002
+ "notNull": false,
2003
+ "autoincrement": false
2004
+ },
2005
+ "active_organization_type": {
2006
+ "name": "active_organization_type",
2007
+ "type": "text",
2008
+ "primaryKey": false,
2009
+ "notNull": false,
2010
+ "autoincrement": false
2011
+ }
2012
+ },
2013
+ "indexes": {
2014
+ "sessions_token_unique": {
2015
+ "name": "sessions_token_unique",
2016
+ "columns": [
2017
+ "token"
2018
+ ],
2019
+ "isUnique": true
2020
+ }
2021
+ },
2022
+ "foreignKeys": {
2023
+ "sessions_user_id_users_id_fk": {
2024
+ "name": "sessions_user_id_users_id_fk",
2025
+ "tableFrom": "sessions",
2026
+ "tableTo": "users",
2027
+ "columnsFrom": [
2028
+ "user_id"
2029
+ ],
2030
+ "columnsTo": [
2031
+ "id"
2032
+ ],
2033
+ "onDelete": "cascade",
2034
+ "onUpdate": "no action"
2035
+ }
2036
+ },
2037
+ "compositePrimaryKeys": {},
2038
+ "uniqueConstraints": {},
2039
+ "checkConstraints": {}
2040
+ },
2041
+ "users": {
2042
+ "name": "users",
2043
+ "columns": {
2044
+ "id": {
2045
+ "name": "id",
2046
+ "type": "text",
2047
+ "primaryKey": true,
2048
+ "notNull": true,
2049
+ "autoincrement": false
2050
+ },
2051
+ "name": {
2052
+ "name": "name",
2053
+ "type": "text",
2054
+ "primaryKey": false,
2055
+ "notNull": true,
2056
+ "autoincrement": false
2057
+ },
2058
+ "email": {
2059
+ "name": "email",
2060
+ "type": "text",
2061
+ "primaryKey": false,
2062
+ "notNull": true,
2063
+ "autoincrement": false
2064
+ },
2065
+ "email_verified": {
2066
+ "name": "email_verified",
2067
+ "type": "integer",
2068
+ "primaryKey": false,
2069
+ "notNull": true,
2070
+ "autoincrement": false
2071
+ },
2072
+ "image": {
2073
+ "name": "image",
2074
+ "type": "text",
2075
+ "primaryKey": false,
2076
+ "notNull": false,
2077
+ "autoincrement": false
2078
+ },
2079
+ "created_at": {
2080
+ "name": "created_at",
2081
+ "type": "integer",
2082
+ "primaryKey": false,
2083
+ "notNull": true,
2084
+ "autoincrement": false
2085
+ },
2086
+ "updated_at": {
2087
+ "name": "updated_at",
2088
+ "type": "integer",
2089
+ "primaryKey": false,
2090
+ "notNull": true,
2091
+ "autoincrement": false
2092
+ },
2093
+ "role": {
2094
+ "name": "role",
2095
+ "type": "text",
2096
+ "primaryKey": false,
2097
+ "notNull": false,
2098
+ "autoincrement": false
2099
+ },
2100
+ "banned": {
2101
+ "name": "banned",
2102
+ "type": "integer",
2103
+ "primaryKey": false,
2104
+ "notNull": false,
2105
+ "autoincrement": false
2106
+ },
2107
+ "ban_reason": {
2108
+ "name": "ban_reason",
2109
+ "type": "text",
2110
+ "primaryKey": false,
2111
+ "notNull": false,
2112
+ "autoincrement": false
2113
+ },
2114
+ "ban_expires": {
2115
+ "name": "ban_expires",
2116
+ "type": "integer",
2117
+ "primaryKey": false,
2118
+ "notNull": false,
2119
+ "autoincrement": false
2120
+ },
2121
+ "stripe_customer_id": {
2122
+ "name": "stripe_customer_id",
2123
+ "type": "text",
2124
+ "primaryKey": false,
2125
+ "notNull": false,
2126
+ "autoincrement": false
2127
+ },
2128
+ "preferences": {
2129
+ "name": "preferences",
2130
+ "type": "text",
2131
+ "primaryKey": false,
2132
+ "notNull": false,
2133
+ "autoincrement": false,
2134
+ "default": "'{}'"
2135
+ },
2136
+ "metadata": {
2137
+ "name": "metadata",
2138
+ "type": "text",
2139
+ "primaryKey": false,
2140
+ "notNull": false,
2141
+ "autoincrement": false,
2142
+ "default": "'{}'"
2143
+ },
2144
+ "onboarding": {
2145
+ "name": "onboarding",
2146
+ "type": "integer",
2147
+ "primaryKey": false,
2148
+ "notNull": false,
2149
+ "autoincrement": false
2150
+ },
2151
+ "flags": {
2152
+ "name": "flags",
2153
+ "type": "text",
2154
+ "primaryKey": false,
2155
+ "notNull": false,
2156
+ "autoincrement": false,
2157
+ "default": "'[]'"
2158
+ },
2159
+ "locale": {
2160
+ "name": "locale",
2161
+ "type": "text",
2162
+ "primaryKey": false,
2163
+ "notNull": false,
2164
+ "autoincrement": false
2165
+ }
2166
+ },
2167
+ "indexes": {
2168
+ "users_email_unique": {
2169
+ "name": "users_email_unique",
2170
+ "columns": [
2171
+ "email"
2172
+ ],
2173
+ "isUnique": true
2174
+ },
2175
+ "users_stripe_customer_id_unique": {
2176
+ "name": "users_stripe_customer_id_unique",
2177
+ "columns": [
2178
+ "stripe_customer_id"
2179
+ ],
2180
+ "isUnique": true
2181
+ }
2182
+ },
2183
+ "foreignKeys": {},
2184
+ "compositePrimaryKeys": {},
2185
+ "uniqueConstraints": {},
2186
+ "checkConstraints": {}
2187
+ },
2188
+ "verifications": {
2189
+ "name": "verifications",
2190
+ "columns": {
2191
+ "id": {
2192
+ "name": "id",
2193
+ "type": "text",
2194
+ "primaryKey": true,
2195
+ "notNull": true,
2196
+ "autoincrement": false
2197
+ },
2198
+ "identifier": {
2199
+ "name": "identifier",
2200
+ "type": "text",
2201
+ "primaryKey": false,
2202
+ "notNull": true,
2203
+ "autoincrement": false
2204
+ },
2205
+ "value": {
2206
+ "name": "value",
2207
+ "type": "text",
2208
+ "primaryKey": false,
2209
+ "notNull": true,
2210
+ "autoincrement": false
2211
+ },
2212
+ "expires_at": {
2213
+ "name": "expires_at",
2214
+ "type": "integer",
2215
+ "primaryKey": false,
2216
+ "notNull": true,
2217
+ "autoincrement": false
2218
+ },
2219
+ "created_at": {
2220
+ "name": "created_at",
2221
+ "type": "integer",
2222
+ "primaryKey": false,
2223
+ "notNull": false,
2224
+ "autoincrement": false
2225
+ },
2226
+ "updated_at": {
2227
+ "name": "updated_at",
2228
+ "type": "integer",
2229
+ "primaryKey": false,
2230
+ "notNull": false,
2231
+ "autoincrement": false
2232
+ }
2233
+ },
2234
+ "indexes": {},
2235
+ "foreignKeys": {},
2236
+ "compositePrimaryKeys": {},
2237
+ "uniqueConstraints": {},
2238
+ "checkConstraints": {}
2239
+ },
2240
+ "waitlist": {
2241
+ "name": "waitlist",
2242
+ "columns": {
2243
+ "id": {
2244
+ "name": "id",
2245
+ "type": "text",
2246
+ "primaryKey": true,
2247
+ "notNull": true,
2248
+ "autoincrement": false
2249
+ },
2250
+ "name": {
2251
+ "name": "name",
2252
+ "type": "text",
2253
+ "primaryKey": false,
2254
+ "notNull": false,
2255
+ "autoincrement": false
2256
+ },
2257
+ "email": {
2258
+ "name": "email",
2259
+ "type": "text",
2260
+ "primaryKey": false,
2261
+ "notNull": false,
2262
+ "autoincrement": false
2263
+ },
2264
+ "created_at": {
2265
+ "name": "created_at",
2266
+ "type": "integer",
2267
+ "primaryKey": false,
2268
+ "notNull": true,
2269
+ "autoincrement": false
2270
+ },
2271
+ "updated_at": {
2272
+ "name": "updated_at",
2273
+ "type": "integer",
2274
+ "primaryKey": false,
2275
+ "notNull": false,
2276
+ "autoincrement": false
2277
+ },
2278
+ "status": {
2279
+ "name": "status",
2280
+ "type": "text",
2281
+ "primaryKey": false,
2282
+ "notNull": true,
2283
+ "autoincrement": false,
2284
+ "default": "'WAITLIST'"
2285
+ },
2286
+ "code": {
2287
+ "name": "code",
2288
+ "type": "text",
2289
+ "primaryKey": false,
2290
+ "notNull": false,
2291
+ "autoincrement": false
2292
+ },
2293
+ "expires_at": {
2294
+ "name": "expires_at",
2295
+ "type": "integer",
2296
+ "primaryKey": false,
2297
+ "notNull": false,
2298
+ "autoincrement": false
2299
+ },
2300
+ "user_id": {
2301
+ "name": "user_id",
2302
+ "type": "text",
2303
+ "primaryKey": false,
2304
+ "notNull": false,
2305
+ "autoincrement": false
2306
+ }
2307
+ },
2308
+ "indexes": {},
2309
+ "foreignKeys": {
2310
+ "waitlist_user_id_users_id_fk": {
2311
+ "name": "waitlist_user_id_users_id_fk",
2312
+ "tableFrom": "waitlist",
2313
+ "tableTo": "users",
2314
+ "columnsFrom": [
2315
+ "user_id"
2316
+ ],
2317
+ "columnsTo": [
2318
+ "id"
2319
+ ],
2320
+ "onDelete": "no action",
2321
+ "onUpdate": "no action"
2322
+ }
2323
+ },
2324
+ "compositePrimaryKeys": {},
2325
+ "uniqueConstraints": {},
2326
+ "checkConstraints": {}
2327
+ },
2328
+ "workflows": {
2329
+ "name": "workflows",
2330
+ "columns": {
2331
+ "id": {
2332
+ "name": "id",
2333
+ "type": "text",
2334
+ "primaryKey": true,
2335
+ "notNull": true,
2336
+ "autoincrement": false
2337
+ },
2338
+ "user_id": {
2339
+ "name": "user_id",
2340
+ "type": "text",
2341
+ "primaryKey": false,
2342
+ "notNull": false,
2343
+ "autoincrement": false
2344
+ },
2345
+ "job_id": {
2346
+ "name": "job_id",
2347
+ "type": "text",
2348
+ "primaryKey": false,
2349
+ "notNull": true,
2350
+ "autoincrement": false
2351
+ },
2352
+ "job_name": {
2353
+ "name": "job_name",
2354
+ "type": "text",
2355
+ "primaryKey": false,
2356
+ "notNull": true,
2357
+ "autoincrement": false
2358
+ },
2359
+ "queue_name": {
2360
+ "name": "queue_name",
2361
+ "type": "text",
2362
+ "primaryKey": false,
2363
+ "notNull": true,
2364
+ "autoincrement": false
2365
+ },
2366
+ "timeout": {
2367
+ "name": "timeout",
2368
+ "type": "integer",
2369
+ "primaryKey": false,
2370
+ "notNull": false,
2371
+ "autoincrement": false
2372
+ },
2373
+ "tags": {
2374
+ "name": "tags",
2375
+ "type": "text",
2376
+ "primaryKey": false,
2377
+ "notNull": false,
2378
+ "autoincrement": false
2379
+ },
2380
+ "input": {
2381
+ "name": "input",
2382
+ "type": "text",
2383
+ "primaryKey": false,
2384
+ "notNull": false,
2385
+ "autoincrement": false
2386
+ },
2387
+ "output": {
2388
+ "name": "output",
2389
+ "type": "text",
2390
+ "primaryKey": false,
2391
+ "notNull": false,
2392
+ "autoincrement": false
2393
+ },
2394
+ "status": {
2395
+ "name": "status",
2396
+ "type": "text",
2397
+ "primaryKey": false,
2398
+ "notNull": true,
2399
+ "autoincrement": false
2400
+ },
2401
+ "error": {
2402
+ "name": "error",
2403
+ "type": "text",
2404
+ "primaryKey": false,
2405
+ "notNull": false,
2406
+ "autoincrement": false
2407
+ },
2408
+ "retries": {
2409
+ "name": "retries",
2410
+ "type": "integer",
2411
+ "primaryKey": false,
2412
+ "notNull": true,
2413
+ "autoincrement": false,
2414
+ "default": 0
2415
+ },
2416
+ "finished_at": {
2417
+ "name": "finished_at",
2418
+ "type": "integer",
2419
+ "primaryKey": false,
2420
+ "notNull": false,
2421
+ "autoincrement": false
2422
+ },
2423
+ "processed_at": {
2424
+ "name": "processed_at",
2425
+ "type": "integer",
2426
+ "primaryKey": false,
2427
+ "notNull": false,
2428
+ "autoincrement": false
2429
+ },
2430
+ "created_at": {
2431
+ "name": "created_at",
2432
+ "type": "integer",
2433
+ "primaryKey": false,
2434
+ "notNull": true,
2435
+ "autoincrement": false
2436
+ },
2437
+ "updated_at": {
2438
+ "name": "updated_at",
2439
+ "type": "integer",
2440
+ "primaryKey": false,
2441
+ "notNull": true,
2442
+ "autoincrement": false
2443
+ }
2444
+ },
2445
+ "indexes": {
2446
+ "workflows_job_id_unique": {
2447
+ "name": "workflows_job_id_unique",
2448
+ "columns": [
2449
+ "job_id"
2450
+ ],
2451
+ "isUnique": true
2452
+ }
2453
+ },
2454
+ "foreignKeys": {
2455
+ "workflows_user_id_users_id_fk": {
2456
+ "name": "workflows_user_id_users_id_fk",
2457
+ "tableFrom": "workflows",
2458
+ "tableTo": "users",
2459
+ "columnsFrom": [
2460
+ "user_id"
2461
+ ],
2462
+ "columnsTo": [
2463
+ "id"
2464
+ ],
2465
+ "onDelete": "cascade",
2466
+ "onUpdate": "no action"
2467
+ }
2468
+ },
2469
+ "compositePrimaryKeys": {},
2470
+ "uniqueConstraints": {},
2471
+ "checkConstraints": {}
2472
+ }
2473
+ },
2474
+ "views": {},
2475
+ "enums": {},
2476
+ "_meta": {
2477
+ "schemas": {},
2478
+ "tables": {},
2479
+ "columns": {}
2480
+ },
2481
+ "internal": {
2482
+ "indexes": {}
2483
+ }
2484
2484
  }