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