create-m5kdev 0.34.0 → 0.36.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 (65) hide show
  1. package/package.json +1 -1
  2. package/templates/minimal-app/.cursor/rules/frontend-data-guide.mdc +1 -0
  3. package/templates/minimal-app/.cursor/rules/server-event-emit.mdc +41 -0
  4. package/templates/minimal-app/AGENTS.md.tpl +1 -0
  5. package/templates/minimal-app/CLAUDE.md.tpl +1 -0
  6. package/templates/minimal-app/README.md.tpl +2 -1
  7. package/templates/minimal-app/apps/e2e/servers.ts.tpl +3 -0
  8. package/templates/minimal-app/apps/e2e/tests/expo-helpers.ts.tpl +2 -34
  9. package/templates/minimal-app/apps/e2e/tests/expo-standard.spec.ts.tpl +225 -5
  10. package/templates/minimal-app/apps/e2e/tests/helpers.ts.tpl +47 -1
  11. package/templates/minimal-app/apps/e2e/tests/standard.spec.ts.tpl +290 -8
  12. package/templates/minimal-app/apps/expo/app.json.tpl +1 -0
  13. package/templates/minimal-app/apps/expo/package.json.tpl +4 -0
  14. package/templates/minimal-app/apps/expo/src/app/_layout.tsx.tpl +4 -1
  15. package/templates/minimal-app/apps/expo/src/app/notifications.tsx.tpl +70 -0
  16. package/templates/minimal-app/apps/expo/src/app/organization/accept-invitation.tsx.tpl +8 -16
  17. package/templates/minimal-app/apps/expo/src/app/posts.tsx.tpl +4 -1
  18. package/templates/minimal-app/apps/expo/src/lib/trpc.ts.tpl +11 -2
  19. package/templates/minimal-app/apps/landing/vite.config.ts.tpl +2 -3
  20. package/templates/minimal-app/apps/server/AGENTS.md.tpl +1 -0
  21. package/templates/minimal-app/apps/server/db.e2e.ts.tpl +5 -40
  22. package/templates/minimal-app/apps/server/db.ts.tpl +5 -42
  23. package/templates/minimal-app/apps/server/drizzle/{0000_wealthy_absorbing_man.sql → 0000_whole_echo.sql} +102 -3
  24. package/templates/minimal-app/apps/server/drizzle/0001_yummy_spectrum.sql +26 -0
  25. package/templates/minimal-app/apps/server/drizzle/0002_crazy_lilith.sql +47 -0
  26. package/templates/minimal-app/apps/server/drizzle/0003_freezing_fantastic_four.sql +4 -0
  27. package/templates/minimal-app/apps/server/drizzle/0004_slow_ezekiel_stane.sql +99 -0
  28. package/templates/minimal-app/apps/server/drizzle/0005_wonderful_the_professor.sql +2 -0
  29. package/templates/minimal-app/apps/server/drizzle/meta/0000_snapshot.json.tpl +2625 -1780
  30. package/templates/minimal-app/apps/server/drizzle/meta/0001_snapshot.json.tpl +2671 -1796
  31. package/templates/minimal-app/apps/server/drizzle/meta/0002_snapshot.json.tpl +2716 -1818
  32. package/templates/minimal-app/apps/server/drizzle/meta/0003_snapshot.json.tpl +715 -164
  33. package/templates/minimal-app/apps/server/drizzle/meta/0004_snapshot.json.tpl +2498 -0
  34. package/templates/minimal-app/apps/server/drizzle/meta/0005_snapshot.json.tpl +2484 -0
  35. package/templates/minimal-app/apps/server/drizzle/meta/_journal.json.tpl +23 -9
  36. package/templates/minimal-app/apps/server/src/app.ts.tpl +4 -1
  37. package/templates/minimal-app/apps/server/src/modules/demo-workflow/demo-workflow.module.ts.tpl +7 -3
  38. package/templates/minimal-app/apps/server/src/modules/demo-workflow/demo-workflow.service.ts.tpl +12 -4
  39. package/templates/minimal-app/apps/server/src/modules/posts/posts.db.ts.tpl +2 -2
  40. package/templates/minimal-app/apps/server/src/modules/posts/posts.module.ts.tpl +7 -4
  41. package/templates/minimal-app/apps/server/src/modules/posts/posts.service.ts.tpl +2 -2
  42. package/templates/minimal-app/apps/server/src/modules/test-harness/test-harness.module.ts.tpl +13 -36
  43. package/templates/minimal-app/apps/server/src/schema.ts.tpl +3 -2
  44. package/templates/minimal-app/apps/shared/package.json.tpl +2 -0
  45. package/templates/minimal-app/apps/shared/src/modules/app/app.constants.ts.tpl +1 -1
  46. package/templates/minimal-app/apps/shared/src/modules/demo-workflow/demo-workflow.constants.ts.tpl +1 -0
  47. package/templates/minimal-app/apps/shared/src/modules/notification/notification.constants.ts.tpl +5 -0
  48. package/templates/minimal-app/apps/shared/src/modules/notification/notification.schema.ts.tpl +1 -1
  49. package/templates/minimal-app/apps/webapp/src/App.tsx.tpl +8 -5
  50. package/templates/minimal-app/apps/webapp/src/Layout.tsx.tpl +17 -1
  51. package/templates/minimal-app/apps/webapp/src/Router.tsx.tpl +10 -8
  52. package/templates/minimal-app/apps/webapp/src/StarterServerEventProvider.tsx.tpl +38 -0
  53. package/templates/minimal-app/apps/webapp/src/modules/notification/NotificationPreferencesRoute.tsx.tpl +29 -0
  54. package/templates/minimal-app/apps/webapp/src/modules/notification/StarterWebPush.tsx.tpl +44 -0
  55. package/templates/minimal-app/apps/webapp/translations/en/{{APP_SLUG}}.json.tpl +8 -0
  56. package/templates/minimal-app/package.json.tpl +5 -4
  57. package/templates/minimal-app/pnpm-workspace.yaml.tpl +12 -11
  58. package/templates/minimal-app/template.manifest.json +1 -0
  59. package/templates/minimal-app/apps/landing/scripts/fly-deploy.mjs.tpl +0 -75
  60. package/templates/minimal-app/apps/landing/scripts/fly-secrets.mjs.tpl +0 -31
  61. package/templates/minimal-app/apps/server/drizzle/0001_third_ink.sql +0 -1
  62. package/templates/minimal-app/apps/server/drizzle/0002_concerned_proudstar.sql +0 -3
  63. package/templates/minimal-app/apps/server/drizzle/0003_silly_the_liberteens.sql +0 -27
  64. package/templates/minimal-app/apps/shared/scripts/fly-deploy.mjs.tpl +0 -75
  65. package/templates/minimal-app/apps/shared/scripts/fly-secrets.mjs.tpl +0 -31
@@ -1,1780 +1,2625 @@
1
- {
2
- "version": "6",
3
- "dialect": "sqlite",
4
- "id": "329ac971-9412-4197-8df7-30c14055ac25",
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": ["claim_id"],
74
- "columnsTo": ["id"],
75
- "onDelete": "cascade",
76
- "onUpdate": "no action"
77
- },
78
- "account_claim_magic_links_user_id_users_id_fk": {
79
- "name": "account_claim_magic_links_user_id_users_id_fk",
80
- "tableFrom": "account_claim_magic_links",
81
- "tableTo": "users",
82
- "columnsFrom": ["user_id"],
83
- "columnsTo": ["id"],
84
- "onDelete": "cascade",
85
- "onUpdate": "no action"
86
- }
87
- },
88
- "compositePrimaryKeys": {},
89
- "uniqueConstraints": {},
90
- "checkConstraints": {}
91
- },
92
- "accounts": {
93
- "name": "accounts",
94
- "columns": {
95
- "id": {
96
- "name": "id",
97
- "type": "text",
98
- "primaryKey": true,
99
- "notNull": true,
100
- "autoincrement": false
101
- },
102
- "account_id": {
103
- "name": "account_id",
104
- "type": "text",
105
- "primaryKey": false,
106
- "notNull": true,
107
- "autoincrement": false
108
- },
109
- "provider_id": {
110
- "name": "provider_id",
111
- "type": "text",
112
- "primaryKey": false,
113
- "notNull": true,
114
- "autoincrement": false
115
- },
116
- "user_id": {
117
- "name": "user_id",
118
- "type": "text",
119
- "primaryKey": false,
120
- "notNull": true,
121
- "autoincrement": false
122
- },
123
- "access_token": {
124
- "name": "access_token",
125
- "type": "text",
126
- "primaryKey": false,
127
- "notNull": false,
128
- "autoincrement": false
129
- },
130
- "refresh_token": {
131
- "name": "refresh_token",
132
- "type": "text",
133
- "primaryKey": false,
134
- "notNull": false,
135
- "autoincrement": false
136
- },
137
- "id_token": {
138
- "name": "id_token",
139
- "type": "text",
140
- "primaryKey": false,
141
- "notNull": false,
142
- "autoincrement": false
143
- },
144
- "access_token_expires_at": {
145
- "name": "access_token_expires_at",
146
- "type": "integer",
147
- "primaryKey": false,
148
- "notNull": false,
149
- "autoincrement": false
150
- },
151
- "refresh_token_expires_at": {
152
- "name": "refresh_token_expires_at",
153
- "type": "integer",
154
- "primaryKey": false,
155
- "notNull": false,
156
- "autoincrement": false
157
- },
158
- "scope": {
159
- "name": "scope",
160
- "type": "text",
161
- "primaryKey": false,
162
- "notNull": false,
163
- "autoincrement": false
164
- },
165
- "password": {
166
- "name": "password",
167
- "type": "text",
168
- "primaryKey": false,
169
- "notNull": false,
170
- "autoincrement": false
171
- },
172
- "created_at": {
173
- "name": "created_at",
174
- "type": "integer",
175
- "primaryKey": false,
176
- "notNull": true,
177
- "autoincrement": false
178
- },
179
- "updated_at": {
180
- "name": "updated_at",
181
- "type": "integer",
182
- "primaryKey": false,
183
- "notNull": true,
184
- "autoincrement": false
185
- }
186
- },
187
- "indexes": {},
188
- "foreignKeys": {
189
- "accounts_user_id_users_id_fk": {
190
- "name": "accounts_user_id_users_id_fk",
191
- "tableFrom": "accounts",
192
- "tableTo": "users",
193
- "columnsFrom": ["user_id"],
194
- "columnsTo": ["id"],
195
- "onDelete": "cascade",
196
- "onUpdate": "no action"
197
- }
198
- },
199
- "compositePrimaryKeys": {},
200
- "uniqueConstraints": {},
201
- "checkConstraints": {}
202
- },
203
- "apikeys": {
204
- "name": "apikeys",
205
- "columns": {
206
- "id": {
207
- "name": "id",
208
- "type": "text",
209
- "primaryKey": true,
210
- "notNull": true,
211
- "autoincrement": false
212
- },
213
- "name": {
214
- "name": "name",
215
- "type": "text",
216
- "primaryKey": false,
217
- "notNull": false,
218
- "autoincrement": false
219
- },
220
- "start": {
221
- "name": "start",
222
- "type": "text",
223
- "primaryKey": false,
224
- "notNull": false,
225
- "autoincrement": false
226
- },
227
- "prefix": {
228
- "name": "prefix",
229
- "type": "text",
230
- "primaryKey": false,
231
- "notNull": false,
232
- "autoincrement": false
233
- },
234
- "key": {
235
- "name": "key",
236
- "type": "text",
237
- "primaryKey": false,
238
- "notNull": true,
239
- "autoincrement": false
240
- },
241
- "user_id": {
242
- "name": "user_id",
243
- "type": "text",
244
- "primaryKey": false,
245
- "notNull": true,
246
- "autoincrement": false
247
- },
248
- "refill_interval": {
249
- "name": "refill_interval",
250
- "type": "integer",
251
- "primaryKey": false,
252
- "notNull": false,
253
- "autoincrement": false
254
- },
255
- "refill_amount": {
256
- "name": "refill_amount",
257
- "type": "integer",
258
- "primaryKey": false,
259
- "notNull": false,
260
- "autoincrement": false
261
- },
262
- "last_refill_at": {
263
- "name": "last_refill_at",
264
- "type": "integer",
265
- "primaryKey": false,
266
- "notNull": false,
267
- "autoincrement": false
268
- },
269
- "enabled": {
270
- "name": "enabled",
271
- "type": "integer",
272
- "primaryKey": false,
273
- "notNull": true,
274
- "autoincrement": false
275
- },
276
- "rate_limit_enabled": {
277
- "name": "rate_limit_enabled",
278
- "type": "integer",
279
- "primaryKey": false,
280
- "notNull": true,
281
- "autoincrement": false
282
- },
283
- "rate_limit_time_window": {
284
- "name": "rate_limit_time_window",
285
- "type": "integer",
286
- "primaryKey": false,
287
- "notNull": false,
288
- "autoincrement": false
289
- },
290
- "rate_limit_max": {
291
- "name": "rate_limit_max",
292
- "type": "integer",
293
- "primaryKey": false,
294
- "notNull": false,
295
- "autoincrement": false
296
- },
297
- "request_count": {
298
- "name": "request_count",
299
- "type": "integer",
300
- "primaryKey": false,
301
- "notNull": true,
302
- "autoincrement": false
303
- },
304
- "remaining": {
305
- "name": "remaining",
306
- "type": "integer",
307
- "primaryKey": false,
308
- "notNull": false,
309
- "autoincrement": false
310
- },
311
- "last_request": {
312
- "name": "last_request",
313
- "type": "integer",
314
- "primaryKey": false,
315
- "notNull": false,
316
- "autoincrement": false
317
- },
318
- "expires_at": {
319
- "name": "expires_at",
320
- "type": "integer",
321
- "primaryKey": false,
322
- "notNull": false,
323
- "autoincrement": false
324
- },
325
- "created_at": {
326
- "name": "created_at",
327
- "type": "integer",
328
- "primaryKey": false,
329
- "notNull": true,
330
- "autoincrement": false
331
- },
332
- "updated_at": {
333
- "name": "updated_at",
334
- "type": "integer",
335
- "primaryKey": false,
336
- "notNull": true,
337
- "autoincrement": false
338
- },
339
- "permissions": {
340
- "name": "permissions",
341
- "type": "text",
342
- "primaryKey": false,
343
- "notNull": false,
344
- "autoincrement": false
345
- },
346
- "metadata": {
347
- "name": "metadata",
348
- "type": "text",
349
- "primaryKey": false,
350
- "notNull": false,
351
- "autoincrement": false
352
- }
353
- },
354
- "indexes": {},
355
- "foreignKeys": {
356
- "apikeys_user_id_users_id_fk": {
357
- "name": "apikeys_user_id_users_id_fk",
358
- "tableFrom": "apikeys",
359
- "tableTo": "users",
360
- "columnsFrom": ["user_id"],
361
- "columnsTo": ["id"],
362
- "onDelete": "no action",
363
- "onUpdate": "no action"
364
- }
365
- },
366
- "compositePrimaryKeys": {},
367
- "uniqueConstraints": {},
368
- "checkConstraints": {}
369
- },
370
- "invitations": {
371
- "name": "invitations",
372
- "columns": {
373
- "id": {
374
- "name": "id",
375
- "type": "text",
376
- "primaryKey": true,
377
- "notNull": true,
378
- "autoincrement": false
379
- },
380
- "organization_id": {
381
- "name": "organization_id",
382
- "type": "text",
383
- "primaryKey": false,
384
- "notNull": true,
385
- "autoincrement": false
386
- },
387
- "team_id": {
388
- "name": "team_id",
389
- "type": "text",
390
- "primaryKey": false,
391
- "notNull": false,
392
- "autoincrement": false
393
- },
394
- "email": {
395
- "name": "email",
396
- "type": "text",
397
- "primaryKey": false,
398
- "notNull": true,
399
- "autoincrement": false
400
- },
401
- "role": {
402
- "name": "role",
403
- "type": "text",
404
- "primaryKey": false,
405
- "notNull": false,
406
- "autoincrement": false
407
- },
408
- "status": {
409
- "name": "status",
410
- "type": "text",
411
- "primaryKey": false,
412
- "notNull": true,
413
- "autoincrement": false
414
- },
415
- "created_at": {
416
- "name": "created_at",
417
- "type": "integer",
418
- "primaryKey": false,
419
- "notNull": true,
420
- "autoincrement": false
421
- },
422
- "expires_at": {
423
- "name": "expires_at",
424
- "type": "integer",
425
- "primaryKey": false,
426
- "notNull": true,
427
- "autoincrement": false
428
- },
429
- "inviter_id": {
430
- "name": "inviter_id",
431
- "type": "text",
432
- "primaryKey": false,
433
- "notNull": true,
434
- "autoincrement": false
435
- }
436
- },
437
- "indexes": {},
438
- "foreignKeys": {
439
- "invitations_organization_id_organizations_id_fk": {
440
- "name": "invitations_organization_id_organizations_id_fk",
441
- "tableFrom": "invitations",
442
- "tableTo": "organizations",
443
- "columnsFrom": ["organization_id"],
444
- "columnsTo": ["id"],
445
- "onDelete": "no action",
446
- "onUpdate": "no action"
447
- },
448
- "invitations_team_id_teams_id_fk": {
449
- "name": "invitations_team_id_teams_id_fk",
450
- "tableFrom": "invitations",
451
- "tableTo": "teams",
452
- "columnsFrom": ["team_id"],
453
- "columnsTo": ["id"],
454
- "onDelete": "no action",
455
- "onUpdate": "no action"
456
- },
457
- "invitations_inviter_id_users_id_fk": {
458
- "name": "invitations_inviter_id_users_id_fk",
459
- "tableFrom": "invitations",
460
- "tableTo": "users",
461
- "columnsFrom": ["inviter_id"],
462
- "columnsTo": ["id"],
463
- "onDelete": "no action",
464
- "onUpdate": "no action"
465
- }
466
- },
467
- "compositePrimaryKeys": {},
468
- "uniqueConstraints": {},
469
- "checkConstraints": {}
470
- },
471
- "members": {
472
- "name": "members",
473
- "columns": {
474
- "id": {
475
- "name": "id",
476
- "type": "text",
477
- "primaryKey": true,
478
- "notNull": true,
479
- "autoincrement": false
480
- },
481
- "organization_id": {
482
- "name": "organization_id",
483
- "type": "text",
484
- "primaryKey": false,
485
- "notNull": true,
486
- "autoincrement": false
487
- },
488
- "user_id": {
489
- "name": "user_id",
490
- "type": "text",
491
- "primaryKey": false,
492
- "notNull": true,
493
- "autoincrement": false
494
- },
495
- "role": {
496
- "name": "role",
497
- "type": "text",
498
- "primaryKey": false,
499
- "notNull": true,
500
- "autoincrement": false
501
- },
502
- "created_at": {
503
- "name": "created_at",
504
- "type": "integer",
505
- "primaryKey": false,
506
- "notNull": true,
507
- "autoincrement": false
508
- },
509
- "preferences": {
510
- "name": "preferences",
511
- "type": "text",
512
- "primaryKey": false,
513
- "notNull": false,
514
- "autoincrement": false,
515
- "default": "'{}'"
516
- },
517
- "metadata": {
518
- "name": "metadata",
519
- "type": "text",
520
- "primaryKey": false,
521
- "notNull": false,
522
- "autoincrement": false,
523
- "default": "'{}'"
524
- },
525
- "onboarding": {
526
- "name": "onboarding",
527
- "type": "integer",
528
- "primaryKey": false,
529
- "notNull": false,
530
- "autoincrement": false
531
- },
532
- "flags": {
533
- "name": "flags",
534
- "type": "text",
535
- "primaryKey": false,
536
- "notNull": false,
537
- "autoincrement": false,
538
- "default": "'[]'"
539
- }
540
- },
541
- "indexes": {},
542
- "foreignKeys": {
543
- "members_organization_id_organizations_id_fk": {
544
- "name": "members_organization_id_organizations_id_fk",
545
- "tableFrom": "members",
546
- "tableTo": "organizations",
547
- "columnsFrom": ["organization_id"],
548
- "columnsTo": ["id"],
549
- "onDelete": "no action",
550
- "onUpdate": "no action"
551
- },
552
- "members_user_id_users_id_fk": {
553
- "name": "members_user_id_users_id_fk",
554
- "tableFrom": "members",
555
- "tableTo": "users",
556
- "columnsFrom": ["user_id"],
557
- "columnsTo": ["id"],
558
- "onDelete": "no action",
559
- "onUpdate": "no action"
560
- }
561
- },
562
- "compositePrimaryKeys": {},
563
- "uniqueConstraints": {},
564
- "checkConstraints": {}
565
- },
566
- "notification_devices": {
567
- "name": "notification_devices",
568
- "columns": {
569
- "id": {
570
- "name": "id",
571
- "type": "text",
572
- "primaryKey": true,
573
- "notNull": true,
574
- "autoincrement": false
575
- },
576
- "user_id": {
577
- "name": "user_id",
578
- "type": "text",
579
- "primaryKey": false,
580
- "notNull": true,
581
- "autoincrement": false
582
- },
583
- "platform": {
584
- "name": "platform",
585
- "type": "text",
586
- "primaryKey": false,
587
- "notNull": true,
588
- "autoincrement": false
589
- },
590
- "endpoint": {
591
- "name": "endpoint",
592
- "type": "text",
593
- "primaryKey": false,
594
- "notNull": false,
595
- "autoincrement": false
596
- },
597
- "subscription": {
598
- "name": "subscription",
599
- "type": "text",
600
- "primaryKey": false,
601
- "notNull": false,
602
- "autoincrement": false
603
- },
604
- "token": {
605
- "name": "token",
606
- "type": "text",
607
- "primaryKey": false,
608
- "notNull": false,
609
- "autoincrement": false
610
- },
611
- "label": {
612
- "name": "label",
613
- "type": "text",
614
- "primaryKey": false,
615
- "notNull": false,
616
- "autoincrement": false
617
- },
618
- "enabled": {
619
- "name": "enabled",
620
- "type": "integer",
621
- "primaryKey": false,
622
- "notNull": true,
623
- "autoincrement": false,
624
- "default": true
625
- },
626
- "created_at": {
627
- "name": "created_at",
628
- "type": "integer",
629
- "primaryKey": false,
630
- "notNull": true,
631
- "autoincrement": false
632
- },
633
- "updated_at": {
634
- "name": "updated_at",
635
- "type": "integer",
636
- "primaryKey": false,
637
- "notNull": true,
638
- "autoincrement": false
639
- }
640
- },
641
- "indexes": {
642
- "notification_devices_endpoint_unique": {
643
- "name": "notification_devices_endpoint_unique",
644
- "columns": ["endpoint"],
645
- "isUnique": true
646
- },
647
- "notification_devices_token_unique": {
648
- "name": "notification_devices_token_unique",
649
- "columns": ["token"],
650
- "isUnique": true
651
- }
652
- },
653
- "foreignKeys": {
654
- "notification_devices_user_id_users_id_fk": {
655
- "name": "notification_devices_user_id_users_id_fk",
656
- "tableFrom": "notification_devices",
657
- "tableTo": "users",
658
- "columnsFrom": ["user_id"],
659
- "columnsTo": ["id"],
660
- "onDelete": "cascade",
661
- "onUpdate": "no action"
662
- }
663
- },
664
- "compositePrimaryKeys": {},
665
- "uniqueConstraints": {},
666
- "checkConstraints": {}
667
- },
668
- "notification_send_logs": {
669
- "name": "notification_send_logs",
670
- "columns": {
671
- "id": {
672
- "name": "id",
673
- "type": "text",
674
- "primaryKey": true,
675
- "notNull": true,
676
- "autoincrement": false
677
- },
678
- "batch_id": {
679
- "name": "batch_id",
680
- "type": "text",
681
- "primaryKey": false,
682
- "notNull": true,
683
- "autoincrement": false
684
- },
685
- "user_id": {
686
- "name": "user_id",
687
- "type": "text",
688
- "primaryKey": false,
689
- "notNull": true,
690
- "autoincrement": false
691
- },
692
- "device_id": {
693
- "name": "device_id",
694
- "type": "text",
695
- "primaryKey": false,
696
- "notNull": true,
697
- "autoincrement": false
698
- },
699
- "provider": {
700
- "name": "provider",
701
- "type": "text",
702
- "primaryKey": false,
703
- "notNull": true,
704
- "autoincrement": false
705
- },
706
- "title": {
707
- "name": "title",
708
- "type": "text",
709
- "primaryKey": false,
710
- "notNull": true,
711
- "autoincrement": false
712
- },
713
- "body": {
714
- "name": "body",
715
- "type": "text",
716
- "primaryKey": false,
717
- "notNull": true,
718
- "autoincrement": false
719
- },
720
- "data": {
721
- "name": "data",
722
- "type": "text",
723
- "primaryKey": false,
724
- "notNull": false,
725
- "autoincrement": false
726
- },
727
- "status": {
728
- "name": "status",
729
- "type": "text",
730
- "primaryKey": false,
731
- "notNull": true,
732
- "autoincrement": false
733
- },
734
- "error": {
735
- "name": "error",
736
- "type": "text",
737
- "primaryKey": false,
738
- "notNull": false,
739
- "autoincrement": false
740
- },
741
- "job_id": {
742
- "name": "job_id",
743
- "type": "text",
744
- "primaryKey": false,
745
- "notNull": false,
746
- "autoincrement": false
747
- },
748
- "created_at": {
749
- "name": "created_at",
750
- "type": "integer",
751
- "primaryKey": false,
752
- "notNull": true,
753
- "autoincrement": false
754
- },
755
- "updated_at": {
756
- "name": "updated_at",
757
- "type": "integer",
758
- "primaryKey": false,
759
- "notNull": true,
760
- "autoincrement": false
761
- }
762
- },
763
- "indexes": {},
764
- "foreignKeys": {
765
- "notification_send_logs_user_id_users_id_fk": {
766
- "name": "notification_send_logs_user_id_users_id_fk",
767
- "tableFrom": "notification_send_logs",
768
- "tableTo": "users",
769
- "columnsFrom": ["user_id"],
770
- "columnsTo": ["id"],
771
- "onDelete": "cascade",
772
- "onUpdate": "no action"
773
- },
774
- "notification_send_logs_device_id_notification_devices_id_fk": {
775
- "name": "notification_send_logs_device_id_notification_devices_id_fk",
776
- "tableFrom": "notification_send_logs",
777
- "tableTo": "notification_devices",
778
- "columnsFrom": ["device_id"],
779
- "columnsTo": ["id"],
780
- "onDelete": "cascade",
781
- "onUpdate": "no action"
782
- }
783
- },
784
- "compositePrimaryKeys": {},
785
- "uniqueConstraints": {},
786
- "checkConstraints": {}
787
- },
788
- "organizations": {
789
- "name": "organizations",
790
- "columns": {
791
- "id": {
792
- "name": "id",
793
- "type": "text",
794
- "primaryKey": true,
795
- "notNull": true,
796
- "autoincrement": false
797
- },
798
- "name": {
799
- "name": "name",
800
- "type": "text",
801
- "primaryKey": false,
802
- "notNull": true,
803
- "autoincrement": false
804
- },
805
- "slug": {
806
- "name": "slug",
807
- "type": "text",
808
- "primaryKey": false,
809
- "notNull": false,
810
- "autoincrement": false
811
- },
812
- "logo": {
813
- "name": "logo",
814
- "type": "text",
815
- "primaryKey": false,
816
- "notNull": false,
817
- "autoincrement": false
818
- },
819
- "type": {
820
- "name": "type",
821
- "type": "text",
822
- "primaryKey": false,
823
- "notNull": false,
824
- "autoincrement": false
825
- },
826
- "parent_id": {
827
- "name": "parent_id",
828
- "type": "text",
829
- "primaryKey": false,
830
- "notNull": false,
831
- "autoincrement": false
832
- },
833
- "created_at": {
834
- "name": "created_at",
835
- "type": "integer",
836
- "primaryKey": false,
837
- "notNull": true,
838
- "autoincrement": false
839
- },
840
- "onboarding": {
841
- "name": "onboarding",
842
- "type": "integer",
843
- "primaryKey": false,
844
- "notNull": false,
845
- "autoincrement": false
846
- },
847
- "preferences": {
848
- "name": "preferences",
849
- "type": "text",
850
- "primaryKey": false,
851
- "notNull": false,
852
- "autoincrement": false,
853
- "default": "'{}'"
854
- },
855
- "metadata": {
856
- "name": "metadata",
857
- "type": "text",
858
- "primaryKey": false,
859
- "notNull": false,
860
- "autoincrement": false,
861
- "default": "'{}'"
862
- },
863
- "flags": {
864
- "name": "flags",
865
- "type": "text",
866
- "primaryKey": false,
867
- "notNull": false,
868
- "autoincrement": false,
869
- "default": "'[]'"
870
- },
871
- "locale": {
872
- "name": "locale",
873
- "type": "text",
874
- "primaryKey": false,
875
- "notNull": false,
876
- "autoincrement": false
877
- }
878
- },
879
- "indexes": {
880
- "organizations_slug_unique": {
881
- "name": "organizations_slug_unique",
882
- "columns": ["slug"],
883
- "isUnique": true
884
- }
885
- },
886
- "foreignKeys": {
887
- "organizations_parent_id_organizations_id_fk": {
888
- "name": "organizations_parent_id_organizations_id_fk",
889
- "tableFrom": "organizations",
890
- "tableTo": "organizations",
891
- "columnsFrom": ["parent_id"],
892
- "columnsTo": ["id"],
893
- "onDelete": "set null",
894
- "onUpdate": "no action"
895
- }
896
- },
897
- "compositePrimaryKeys": {},
898
- "uniqueConstraints": {},
899
- "checkConstraints": {}
900
- },
901
- "posts": {
902
- "name": "posts",
903
- "columns": {
904
- "id": {
905
- "name": "id",
906
- "type": "text",
907
- "primaryKey": true,
908
- "notNull": true,
909
- "autoincrement": false
910
- },
911
- "author_user_id": {
912
- "name": "author_user_id",
913
- "type": "text",
914
- "primaryKey": false,
915
- "notNull": false,
916
- "autoincrement": false
917
- },
918
- "organization_id": {
919
- "name": "organization_id",
920
- "type": "text",
921
- "primaryKey": false,
922
- "notNull": false,
923
- "autoincrement": false
924
- },
925
- "team_id": {
926
- "name": "team_id",
927
- "type": "text",
928
- "primaryKey": false,
929
- "notNull": false,
930
- "autoincrement": false
931
- },
932
- "title": {
933
- "name": "title",
934
- "type": "text",
935
- "primaryKey": false,
936
- "notNull": true,
937
- "autoincrement": false
938
- },
939
- "slug": {
940
- "name": "slug",
941
- "type": "text",
942
- "primaryKey": false,
943
- "notNull": true,
944
- "autoincrement": false
945
- },
946
- "excerpt": {
947
- "name": "excerpt",
948
- "type": "text",
949
- "primaryKey": false,
950
- "notNull": false,
951
- "autoincrement": false
952
- },
953
- "content": {
954
- "name": "content",
955
- "type": "text",
956
- "primaryKey": false,
957
- "notNull": true,
958
- "autoincrement": false
959
- },
960
- "status": {
961
- "name": "status",
962
- "type": "text",
963
- "primaryKey": false,
964
- "notNull": true,
965
- "autoincrement": false,
966
- "default": "'draft'"
967
- },
968
- "published_at": {
969
- "name": "published_at",
970
- "type": "integer",
971
- "primaryKey": false,
972
- "notNull": false,
973
- "autoincrement": false
974
- },
975
- "created_at": {
976
- "name": "created_at",
977
- "type": "integer",
978
- "primaryKey": false,
979
- "notNull": true,
980
- "autoincrement": false
981
- },
982
- "updated_at": {
983
- "name": "updated_at",
984
- "type": "integer",
985
- "primaryKey": false,
986
- "notNull": false,
987
- "autoincrement": false
988
- },
989
- "deleted_at": {
990
- "name": "deleted_at",
991
- "type": "integer",
992
- "primaryKey": false,
993
- "notNull": false,
994
- "autoincrement": false
995
- }
996
- },
997
- "indexes": {
998
- "posts_slug_unique": {
999
- "name": "posts_slug_unique",
1000
- "columns": ["slug"],
1001
- "isUnique": true
1002
- }
1003
- },
1004
- "foreignKeys": {
1005
- "posts_author_user_id_users_id_fk": {
1006
- "name": "posts_author_user_id_users_id_fk",
1007
- "tableFrom": "posts",
1008
- "tableTo": "users",
1009
- "columnsFrom": ["author_user_id"],
1010
- "columnsTo": ["id"],
1011
- "onDelete": "set null",
1012
- "onUpdate": "no action"
1013
- },
1014
- "posts_organization_id_organizations_id_fk": {
1015
- "name": "posts_organization_id_organizations_id_fk",
1016
- "tableFrom": "posts",
1017
- "tableTo": "organizations",
1018
- "columnsFrom": ["organization_id"],
1019
- "columnsTo": ["id"],
1020
- "onDelete": "set null",
1021
- "onUpdate": "no action"
1022
- },
1023
- "posts_team_id_teams_id_fk": {
1024
- "name": "posts_team_id_teams_id_fk",
1025
- "tableFrom": "posts",
1026
- "tableTo": "teams",
1027
- "columnsFrom": ["team_id"],
1028
- "columnsTo": ["id"],
1029
- "onDelete": "set null",
1030
- "onUpdate": "no action"
1031
- }
1032
- },
1033
- "compositePrimaryKeys": {},
1034
- "uniqueConstraints": {},
1035
- "checkConstraints": {}
1036
- },
1037
- "sessions": {
1038
- "name": "sessions",
1039
- "columns": {
1040
- "id": {
1041
- "name": "id",
1042
- "type": "text",
1043
- "primaryKey": true,
1044
- "notNull": true,
1045
- "autoincrement": false
1046
- },
1047
- "expires_at": {
1048
- "name": "expires_at",
1049
- "type": "integer",
1050
- "primaryKey": false,
1051
- "notNull": true,
1052
- "autoincrement": false
1053
- },
1054
- "token": {
1055
- "name": "token",
1056
- "type": "text",
1057
- "primaryKey": false,
1058
- "notNull": true,
1059
- "autoincrement": false
1060
- },
1061
- "created_at": {
1062
- "name": "created_at",
1063
- "type": "integer",
1064
- "primaryKey": false,
1065
- "notNull": true,
1066
- "autoincrement": false
1067
- },
1068
- "updated_at": {
1069
- "name": "updated_at",
1070
- "type": "integer",
1071
- "primaryKey": false,
1072
- "notNull": true,
1073
- "autoincrement": false
1074
- },
1075
- "ip_address": {
1076
- "name": "ip_address",
1077
- "type": "text",
1078
- "primaryKey": false,
1079
- "notNull": false,
1080
- "autoincrement": false
1081
- },
1082
- "user_agent": {
1083
- "name": "user_agent",
1084
- "type": "text",
1085
- "primaryKey": false,
1086
- "notNull": false,
1087
- "autoincrement": false
1088
- },
1089
- "user_id": {
1090
- "name": "user_id",
1091
- "type": "text",
1092
- "primaryKey": false,
1093
- "notNull": true,
1094
- "autoincrement": false
1095
- },
1096
- "impersonated_by": {
1097
- "name": "impersonated_by",
1098
- "type": "text",
1099
- "primaryKey": false,
1100
- "notNull": false,
1101
- "autoincrement": false
1102
- },
1103
- "active_organization_id": {
1104
- "name": "active_organization_id",
1105
- "type": "text",
1106
- "primaryKey": false,
1107
- "notNull": false,
1108
- "autoincrement": false
1109
- },
1110
- "active_organization_member_id": {
1111
- "name": "active_organization_member_id",
1112
- "type": "text",
1113
- "primaryKey": false,
1114
- "notNull": false,
1115
- "autoincrement": false
1116
- },
1117
- "active_organization_role": {
1118
- "name": "active_organization_role",
1119
- "type": "text",
1120
- "primaryKey": false,
1121
- "notNull": false,
1122
- "autoincrement": false
1123
- },
1124
- "active_organization_type": {
1125
- "name": "active_organization_type",
1126
- "type": "text",
1127
- "primaryKey": false,
1128
- "notNull": false,
1129
- "autoincrement": false
1130
- },
1131
- "active_team_id": {
1132
- "name": "active_team_id",
1133
- "type": "text",
1134
- "primaryKey": false,
1135
- "notNull": false,
1136
- "autoincrement": false
1137
- },
1138
- "active_team_role": {
1139
- "name": "active_team_role",
1140
- "type": "text",
1141
- "primaryKey": false,
1142
- "notNull": false,
1143
- "autoincrement": false
1144
- }
1145
- },
1146
- "indexes": {
1147
- "sessions_token_unique": {
1148
- "name": "sessions_token_unique",
1149
- "columns": ["token"],
1150
- "isUnique": true
1151
- }
1152
- },
1153
- "foreignKeys": {
1154
- "sessions_user_id_users_id_fk": {
1155
- "name": "sessions_user_id_users_id_fk",
1156
- "tableFrom": "sessions",
1157
- "tableTo": "users",
1158
- "columnsFrom": ["user_id"],
1159
- "columnsTo": ["id"],
1160
- "onDelete": "cascade",
1161
- "onUpdate": "no action"
1162
- }
1163
- },
1164
- "compositePrimaryKeys": {},
1165
- "uniqueConstraints": {},
1166
- "checkConstraints": {}
1167
- },
1168
- "teammembers": {
1169
- "name": "teammembers",
1170
- "columns": {
1171
- "id": {
1172
- "name": "id",
1173
- "type": "text",
1174
- "primaryKey": true,
1175
- "notNull": true,
1176
- "autoincrement": false
1177
- },
1178
- "team_id": {
1179
- "name": "team_id",
1180
- "type": "text",
1181
- "primaryKey": false,
1182
- "notNull": true,
1183
- "autoincrement": false
1184
- },
1185
- "user_id": {
1186
- "name": "user_id",
1187
- "type": "text",
1188
- "primaryKey": false,
1189
- "notNull": true,
1190
- "autoincrement": false
1191
- },
1192
- "role": {
1193
- "name": "role",
1194
- "type": "text",
1195
- "primaryKey": false,
1196
- "notNull": true,
1197
- "autoincrement": false
1198
- },
1199
- "created_at": {
1200
- "name": "created_at",
1201
- "type": "integer",
1202
- "primaryKey": false,
1203
- "notNull": true,
1204
- "autoincrement": false
1205
- }
1206
- },
1207
- "indexes": {},
1208
- "foreignKeys": {
1209
- "teammembers_team_id_teams_id_fk": {
1210
- "name": "teammembers_team_id_teams_id_fk",
1211
- "tableFrom": "teammembers",
1212
- "tableTo": "teams",
1213
- "columnsFrom": ["team_id"],
1214
- "columnsTo": ["id"],
1215
- "onDelete": "no action",
1216
- "onUpdate": "no action"
1217
- },
1218
- "teammembers_user_id_users_id_fk": {
1219
- "name": "teammembers_user_id_users_id_fk",
1220
- "tableFrom": "teammembers",
1221
- "tableTo": "users",
1222
- "columnsFrom": ["user_id"],
1223
- "columnsTo": ["id"],
1224
- "onDelete": "no action",
1225
- "onUpdate": "no action"
1226
- }
1227
- },
1228
- "compositePrimaryKeys": {},
1229
- "uniqueConstraints": {},
1230
- "checkConstraints": {}
1231
- },
1232
- "teams": {
1233
- "name": "teams",
1234
- "columns": {
1235
- "id": {
1236
- "name": "id",
1237
- "type": "text",
1238
- "primaryKey": true,
1239
- "notNull": true,
1240
- "autoincrement": false
1241
- },
1242
- "name": {
1243
- "name": "name",
1244
- "type": "text",
1245
- "primaryKey": false,
1246
- "notNull": true,
1247
- "autoincrement": false
1248
- },
1249
- "organization_id": {
1250
- "name": "organization_id",
1251
- "type": "text",
1252
- "primaryKey": false,
1253
- "notNull": true,
1254
- "autoincrement": false
1255
- },
1256
- "created_at": {
1257
- "name": "created_at",
1258
- "type": "integer",
1259
- "primaryKey": false,
1260
- "notNull": true,
1261
- "autoincrement": false
1262
- },
1263
- "updated_at": {
1264
- "name": "updated_at",
1265
- "type": "integer",
1266
- "primaryKey": false,
1267
- "notNull": false,
1268
- "autoincrement": false
1269
- }
1270
- },
1271
- "indexes": {},
1272
- "foreignKeys": {
1273
- "teams_organization_id_organizations_id_fk": {
1274
- "name": "teams_organization_id_organizations_id_fk",
1275
- "tableFrom": "teams",
1276
- "tableTo": "organizations",
1277
- "columnsFrom": ["organization_id"],
1278
- "columnsTo": ["id"],
1279
- "onDelete": "no action",
1280
- "onUpdate": "no action"
1281
- }
1282
- },
1283
- "compositePrimaryKeys": {},
1284
- "uniqueConstraints": {},
1285
- "checkConstraints": {}
1286
- },
1287
- "users": {
1288
- "name": "users",
1289
- "columns": {
1290
- "id": {
1291
- "name": "id",
1292
- "type": "text",
1293
- "primaryKey": true,
1294
- "notNull": true,
1295
- "autoincrement": false
1296
- },
1297
- "name": {
1298
- "name": "name",
1299
- "type": "text",
1300
- "primaryKey": false,
1301
- "notNull": true,
1302
- "autoincrement": false
1303
- },
1304
- "email": {
1305
- "name": "email",
1306
- "type": "text",
1307
- "primaryKey": false,
1308
- "notNull": true,
1309
- "autoincrement": false
1310
- },
1311
- "email_verified": {
1312
- "name": "email_verified",
1313
- "type": "integer",
1314
- "primaryKey": false,
1315
- "notNull": true,
1316
- "autoincrement": false
1317
- },
1318
- "image": {
1319
- "name": "image",
1320
- "type": "text",
1321
- "primaryKey": false,
1322
- "notNull": false,
1323
- "autoincrement": false
1324
- },
1325
- "created_at": {
1326
- "name": "created_at",
1327
- "type": "integer",
1328
- "primaryKey": false,
1329
- "notNull": true,
1330
- "autoincrement": false
1331
- },
1332
- "updated_at": {
1333
- "name": "updated_at",
1334
- "type": "integer",
1335
- "primaryKey": false,
1336
- "notNull": true,
1337
- "autoincrement": false
1338
- },
1339
- "role": {
1340
- "name": "role",
1341
- "type": "text",
1342
- "primaryKey": false,
1343
- "notNull": false,
1344
- "autoincrement": false
1345
- },
1346
- "banned": {
1347
- "name": "banned",
1348
- "type": "integer",
1349
- "primaryKey": false,
1350
- "notNull": false,
1351
- "autoincrement": false
1352
- },
1353
- "ban_reason": {
1354
- "name": "ban_reason",
1355
- "type": "text",
1356
- "primaryKey": false,
1357
- "notNull": false,
1358
- "autoincrement": false
1359
- },
1360
- "ban_expires": {
1361
- "name": "ban_expires",
1362
- "type": "integer",
1363
- "primaryKey": false,
1364
- "notNull": false,
1365
- "autoincrement": false
1366
- },
1367
- "stripe_customer_id": {
1368
- "name": "stripe_customer_id",
1369
- "type": "text",
1370
- "primaryKey": false,
1371
- "notNull": false,
1372
- "autoincrement": false
1373
- },
1374
- "payment_customer_id": {
1375
- "name": "payment_customer_id",
1376
- "type": "text",
1377
- "primaryKey": false,
1378
- "notNull": false,
1379
- "autoincrement": false
1380
- },
1381
- "payment_plan_tier": {
1382
- "name": "payment_plan_tier",
1383
- "type": "text",
1384
- "primaryKey": false,
1385
- "notNull": false,
1386
- "autoincrement": false
1387
- },
1388
- "payment_plan_expires_at": {
1389
- "name": "payment_plan_expires_at",
1390
- "type": "integer",
1391
- "primaryKey": false,
1392
- "notNull": false,
1393
- "autoincrement": false
1394
- },
1395
- "preferences": {
1396
- "name": "preferences",
1397
- "type": "text",
1398
- "primaryKey": false,
1399
- "notNull": false,
1400
- "autoincrement": false,
1401
- "default": "'{}'"
1402
- },
1403
- "metadata": {
1404
- "name": "metadata",
1405
- "type": "text",
1406
- "primaryKey": false,
1407
- "notNull": false,
1408
- "autoincrement": false,
1409
- "default": "'{}'"
1410
- },
1411
- "onboarding": {
1412
- "name": "onboarding",
1413
- "type": "integer",
1414
- "primaryKey": false,
1415
- "notNull": false,
1416
- "autoincrement": false
1417
- },
1418
- "flags": {
1419
- "name": "flags",
1420
- "type": "text",
1421
- "primaryKey": false,
1422
- "notNull": false,
1423
- "autoincrement": false,
1424
- "default": "'[]'"
1425
- },
1426
- "locale": {
1427
- "name": "locale",
1428
- "type": "text",
1429
- "primaryKey": false,
1430
- "notNull": false,
1431
- "autoincrement": false
1432
- }
1433
- },
1434
- "indexes": {
1435
- "users_email_unique": {
1436
- "name": "users_email_unique",
1437
- "columns": ["email"],
1438
- "isUnique": true
1439
- },
1440
- "users_stripe_customer_id_unique": {
1441
- "name": "users_stripe_customer_id_unique",
1442
- "columns": ["stripe_customer_id"],
1443
- "isUnique": true
1444
- },
1445
- "users_payment_customer_id_unique": {
1446
- "name": "users_payment_customer_id_unique",
1447
- "columns": ["payment_customer_id"],
1448
- "isUnique": true
1449
- }
1450
- },
1451
- "foreignKeys": {},
1452
- "compositePrimaryKeys": {},
1453
- "uniqueConstraints": {},
1454
- "checkConstraints": {}
1455
- },
1456
- "verifications": {
1457
- "name": "verifications",
1458
- "columns": {
1459
- "id": {
1460
- "name": "id",
1461
- "type": "text",
1462
- "primaryKey": true,
1463
- "notNull": true,
1464
- "autoincrement": false
1465
- },
1466
- "identifier": {
1467
- "name": "identifier",
1468
- "type": "text",
1469
- "primaryKey": false,
1470
- "notNull": true,
1471
- "autoincrement": false
1472
- },
1473
- "value": {
1474
- "name": "value",
1475
- "type": "text",
1476
- "primaryKey": false,
1477
- "notNull": true,
1478
- "autoincrement": false
1479
- },
1480
- "expires_at": {
1481
- "name": "expires_at",
1482
- "type": "integer",
1483
- "primaryKey": false,
1484
- "notNull": true,
1485
- "autoincrement": false
1486
- },
1487
- "created_at": {
1488
- "name": "created_at",
1489
- "type": "integer",
1490
- "primaryKey": false,
1491
- "notNull": false,
1492
- "autoincrement": false
1493
- },
1494
- "updated_at": {
1495
- "name": "updated_at",
1496
- "type": "integer",
1497
- "primaryKey": false,
1498
- "notNull": false,
1499
- "autoincrement": false
1500
- }
1501
- },
1502
- "indexes": {},
1503
- "foreignKeys": {},
1504
- "compositePrimaryKeys": {},
1505
- "uniqueConstraints": {},
1506
- "checkConstraints": {}
1507
- },
1508
- "waitlist": {
1509
- "name": "waitlist",
1510
- "columns": {
1511
- "id": {
1512
- "name": "id",
1513
- "type": "text",
1514
- "primaryKey": true,
1515
- "notNull": true,
1516
- "autoincrement": false
1517
- },
1518
- "name": {
1519
- "name": "name",
1520
- "type": "text",
1521
- "primaryKey": false,
1522
- "notNull": false,
1523
- "autoincrement": false
1524
- },
1525
- "email": {
1526
- "name": "email",
1527
- "type": "text",
1528
- "primaryKey": false,
1529
- "notNull": false,
1530
- "autoincrement": false
1531
- },
1532
- "created_at": {
1533
- "name": "created_at",
1534
- "type": "integer",
1535
- "primaryKey": false,
1536
- "notNull": true,
1537
- "autoincrement": false
1538
- },
1539
- "updated_at": {
1540
- "name": "updated_at",
1541
- "type": "integer",
1542
- "primaryKey": false,
1543
- "notNull": false,
1544
- "autoincrement": false
1545
- },
1546
- "status": {
1547
- "name": "status",
1548
- "type": "text",
1549
- "primaryKey": false,
1550
- "notNull": true,
1551
- "autoincrement": false,
1552
- "default": "'WAITLIST'"
1553
- },
1554
- "type": {
1555
- "name": "type",
1556
- "type": "text",
1557
- "primaryKey": false,
1558
- "notNull": true,
1559
- "autoincrement": false,
1560
- "default": "'WAITLIST'"
1561
- },
1562
- "code": {
1563
- "name": "code",
1564
- "type": "text",
1565
- "primaryKey": false,
1566
- "notNull": false,
1567
- "autoincrement": false
1568
- },
1569
- "expires_at": {
1570
- "name": "expires_at",
1571
- "type": "integer",
1572
- "primaryKey": false,
1573
- "notNull": false,
1574
- "autoincrement": false
1575
- },
1576
- "user_id": {
1577
- "name": "user_id",
1578
- "type": "text",
1579
- "primaryKey": false,
1580
- "notNull": false,
1581
- "autoincrement": false
1582
- },
1583
- "claim_user_id": {
1584
- "name": "claim_user_id",
1585
- "type": "text",
1586
- "primaryKey": false,
1587
- "notNull": false,
1588
- "autoincrement": false
1589
- },
1590
- "claimed_at": {
1591
- "name": "claimed_at",
1592
- "type": "integer",
1593
- "primaryKey": false,
1594
- "notNull": false,
1595
- "autoincrement": false
1596
- },
1597
- "claimed_email": {
1598
- "name": "claimed_email",
1599
- "type": "text",
1600
- "primaryKey": false,
1601
- "notNull": false,
1602
- "autoincrement": false
1603
- }
1604
- },
1605
- "indexes": {},
1606
- "foreignKeys": {
1607
- "waitlist_user_id_users_id_fk": {
1608
- "name": "waitlist_user_id_users_id_fk",
1609
- "tableFrom": "waitlist",
1610
- "tableTo": "users",
1611
- "columnsFrom": ["user_id"],
1612
- "columnsTo": ["id"],
1613
- "onDelete": "no action",
1614
- "onUpdate": "no action"
1615
- },
1616
- "waitlist_claim_user_id_users_id_fk": {
1617
- "name": "waitlist_claim_user_id_users_id_fk",
1618
- "tableFrom": "waitlist",
1619
- "tableTo": "users",
1620
- "columnsFrom": ["claim_user_id"],
1621
- "columnsTo": ["id"],
1622
- "onDelete": "no action",
1623
- "onUpdate": "no action"
1624
- }
1625
- },
1626
- "compositePrimaryKeys": {},
1627
- "uniqueConstraints": {},
1628
- "checkConstraints": {}
1629
- },
1630
- "workflows": {
1631
- "name": "workflows",
1632
- "columns": {
1633
- "id": {
1634
- "name": "id",
1635
- "type": "text",
1636
- "primaryKey": true,
1637
- "notNull": true,
1638
- "autoincrement": false
1639
- },
1640
- "user_id": {
1641
- "name": "user_id",
1642
- "type": "text",
1643
- "primaryKey": false,
1644
- "notNull": false,
1645
- "autoincrement": false
1646
- },
1647
- "job_id": {
1648
- "name": "job_id",
1649
- "type": "text",
1650
- "primaryKey": false,
1651
- "notNull": true,
1652
- "autoincrement": false
1653
- },
1654
- "job_name": {
1655
- "name": "job_name",
1656
- "type": "text",
1657
- "primaryKey": false,
1658
- "notNull": true,
1659
- "autoincrement": false
1660
- },
1661
- "queue_name": {
1662
- "name": "queue_name",
1663
- "type": "text",
1664
- "primaryKey": false,
1665
- "notNull": true,
1666
- "autoincrement": false
1667
- },
1668
- "timeout": {
1669
- "name": "timeout",
1670
- "type": "integer",
1671
- "primaryKey": false,
1672
- "notNull": false,
1673
- "autoincrement": false
1674
- },
1675
- "tags": {
1676
- "name": "tags",
1677
- "type": "text",
1678
- "primaryKey": false,
1679
- "notNull": false,
1680
- "autoincrement": false
1681
- },
1682
- "input": {
1683
- "name": "input",
1684
- "type": "text",
1685
- "primaryKey": false,
1686
- "notNull": false,
1687
- "autoincrement": false
1688
- },
1689
- "output": {
1690
- "name": "output",
1691
- "type": "text",
1692
- "primaryKey": false,
1693
- "notNull": false,
1694
- "autoincrement": false
1695
- },
1696
- "status": {
1697
- "name": "status",
1698
- "type": "text",
1699
- "primaryKey": false,
1700
- "notNull": true,
1701
- "autoincrement": false
1702
- },
1703
- "error": {
1704
- "name": "error",
1705
- "type": "text",
1706
- "primaryKey": false,
1707
- "notNull": false,
1708
- "autoincrement": false
1709
- },
1710
- "retries": {
1711
- "name": "retries",
1712
- "type": "integer",
1713
- "primaryKey": false,
1714
- "notNull": true,
1715
- "autoincrement": false,
1716
- "default": 0
1717
- },
1718
- "finished_at": {
1719
- "name": "finished_at",
1720
- "type": "integer",
1721
- "primaryKey": false,
1722
- "notNull": false,
1723
- "autoincrement": false
1724
- },
1725
- "processed_at": {
1726
- "name": "processed_at",
1727
- "type": "integer",
1728
- "primaryKey": false,
1729
- "notNull": false,
1730
- "autoincrement": false
1731
- },
1732
- "created_at": {
1733
- "name": "created_at",
1734
- "type": "integer",
1735
- "primaryKey": false,
1736
- "notNull": true,
1737
- "autoincrement": false
1738
- },
1739
- "updated_at": {
1740
- "name": "updated_at",
1741
- "type": "integer",
1742
- "primaryKey": false,
1743
- "notNull": true,
1744
- "autoincrement": false
1745
- }
1746
- },
1747
- "indexes": {
1748
- "workflows_job_id_unique": {
1749
- "name": "workflows_job_id_unique",
1750
- "columns": ["job_id"],
1751
- "isUnique": true
1752
- }
1753
- },
1754
- "foreignKeys": {
1755
- "workflows_user_id_users_id_fk": {
1756
- "name": "workflows_user_id_users_id_fk",
1757
- "tableFrom": "workflows",
1758
- "tableTo": "users",
1759
- "columnsFrom": ["user_id"],
1760
- "columnsTo": ["id"],
1761
- "onDelete": "cascade",
1762
- "onUpdate": "no action"
1763
- }
1764
- },
1765
- "compositePrimaryKeys": {},
1766
- "uniqueConstraints": {},
1767
- "checkConstraints": {}
1768
- }
1769
- },
1770
- "views": {},
1771
- "enums": {},
1772
- "_meta": {
1773
- "schemas": {},
1774
- "tables": {},
1775
- "columns": {}
1776
- },
1777
- "internal": {
1778
- "indexes": {}
1779
- }
1780
- }
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
+ }