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,1796 +1,2671 @@
1
- {
2
- "version": "6",
3
- "dialect": "sqlite",
4
- "id": "2d972cea-51ee-4fc6-8cb5-b7167a7d8a40",
5
- "prevId": "329ac971-9412-4197-8df7-30c14055ac25",
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
- "member_id": {
919
- "name": "member_id",
920
- "type": "text",
921
- "primaryKey": false,
922
- "notNull": false,
923
- "autoincrement": false
924
- },
925
- "organization_id": {
926
- "name": "organization_id",
927
- "type": "text",
928
- "primaryKey": false,
929
- "notNull": false,
930
- "autoincrement": false
931
- },
932
- "team_id": {
933
- "name": "team_id",
934
- "type": "text",
935
- "primaryKey": false,
936
- "notNull": false,
937
- "autoincrement": false
938
- },
939
- "title": {
940
- "name": "title",
941
- "type": "text",
942
- "primaryKey": false,
943
- "notNull": true,
944
- "autoincrement": false
945
- },
946
- "slug": {
947
- "name": "slug",
948
- "type": "text",
949
- "primaryKey": false,
950
- "notNull": true,
951
- "autoincrement": false
952
- },
953
- "excerpt": {
954
- "name": "excerpt",
955
- "type": "text",
956
- "primaryKey": false,
957
- "notNull": false,
958
- "autoincrement": false
959
- },
960
- "content": {
961
- "name": "content",
962
- "type": "text",
963
- "primaryKey": false,
964
- "notNull": true,
965
- "autoincrement": false
966
- },
967
- "status": {
968
- "name": "status",
969
- "type": "text",
970
- "primaryKey": false,
971
- "notNull": true,
972
- "autoincrement": false,
973
- "default": "'draft'"
974
- },
975
- "published_at": {
976
- "name": "published_at",
977
- "type": "integer",
978
- "primaryKey": false,
979
- "notNull": false,
980
- "autoincrement": false
981
- },
982
- "created_at": {
983
- "name": "created_at",
984
- "type": "integer",
985
- "primaryKey": false,
986
- "notNull": true,
987
- "autoincrement": false
988
- },
989
- "updated_at": {
990
- "name": "updated_at",
991
- "type": "integer",
992
- "primaryKey": false,
993
- "notNull": false,
994
- "autoincrement": false
995
- },
996
- "deleted_at": {
997
- "name": "deleted_at",
998
- "type": "integer",
999
- "primaryKey": false,
1000
- "notNull": false,
1001
- "autoincrement": false
1002
- }
1003
- },
1004
- "indexes": {
1005
- "posts_slug_unique": {
1006
- "name": "posts_slug_unique",
1007
- "columns": ["slug"],
1008
- "isUnique": true
1009
- }
1010
- },
1011
- "foreignKeys": {
1012
- "posts_author_user_id_users_id_fk": {
1013
- "name": "posts_author_user_id_users_id_fk",
1014
- "tableFrom": "posts",
1015
- "tableTo": "users",
1016
- "columnsFrom": ["author_user_id"],
1017
- "columnsTo": ["id"],
1018
- "onDelete": "set null",
1019
- "onUpdate": "no action"
1020
- },
1021
- "posts_member_id_members_id_fk": {
1022
- "name": "posts_member_id_members_id_fk",
1023
- "tableFrom": "posts",
1024
- "tableTo": "members",
1025
- "columnsFrom": ["member_id"],
1026
- "columnsTo": ["id"],
1027
- "onDelete": "set null",
1028
- "onUpdate": "no action"
1029
- },
1030
- "posts_organization_id_organizations_id_fk": {
1031
- "name": "posts_organization_id_organizations_id_fk",
1032
- "tableFrom": "posts",
1033
- "tableTo": "organizations",
1034
- "columnsFrom": ["organization_id"],
1035
- "columnsTo": ["id"],
1036
- "onDelete": "set null",
1037
- "onUpdate": "no action"
1038
- },
1039
- "posts_team_id_teams_id_fk": {
1040
- "name": "posts_team_id_teams_id_fk",
1041
- "tableFrom": "posts",
1042
- "tableTo": "teams",
1043
- "columnsFrom": ["team_id"],
1044
- "columnsTo": ["id"],
1045
- "onDelete": "set null",
1046
- "onUpdate": "no action"
1047
- }
1048
- },
1049
- "compositePrimaryKeys": {},
1050
- "uniqueConstraints": {},
1051
- "checkConstraints": {}
1052
- },
1053
- "sessions": {
1054
- "name": "sessions",
1055
- "columns": {
1056
- "id": {
1057
- "name": "id",
1058
- "type": "text",
1059
- "primaryKey": true,
1060
- "notNull": true,
1061
- "autoincrement": false
1062
- },
1063
- "expires_at": {
1064
- "name": "expires_at",
1065
- "type": "integer",
1066
- "primaryKey": false,
1067
- "notNull": true,
1068
- "autoincrement": false
1069
- },
1070
- "token": {
1071
- "name": "token",
1072
- "type": "text",
1073
- "primaryKey": false,
1074
- "notNull": true,
1075
- "autoincrement": false
1076
- },
1077
- "created_at": {
1078
- "name": "created_at",
1079
- "type": "integer",
1080
- "primaryKey": false,
1081
- "notNull": true,
1082
- "autoincrement": false
1083
- },
1084
- "updated_at": {
1085
- "name": "updated_at",
1086
- "type": "integer",
1087
- "primaryKey": false,
1088
- "notNull": true,
1089
- "autoincrement": false
1090
- },
1091
- "ip_address": {
1092
- "name": "ip_address",
1093
- "type": "text",
1094
- "primaryKey": false,
1095
- "notNull": false,
1096
- "autoincrement": false
1097
- },
1098
- "user_agent": {
1099
- "name": "user_agent",
1100
- "type": "text",
1101
- "primaryKey": false,
1102
- "notNull": false,
1103
- "autoincrement": false
1104
- },
1105
- "user_id": {
1106
- "name": "user_id",
1107
- "type": "text",
1108
- "primaryKey": false,
1109
- "notNull": true,
1110
- "autoincrement": false
1111
- },
1112
- "impersonated_by": {
1113
- "name": "impersonated_by",
1114
- "type": "text",
1115
- "primaryKey": false,
1116
- "notNull": false,
1117
- "autoincrement": false
1118
- },
1119
- "active_organization_id": {
1120
- "name": "active_organization_id",
1121
- "type": "text",
1122
- "primaryKey": false,
1123
- "notNull": false,
1124
- "autoincrement": false
1125
- },
1126
- "active_organization_member_id": {
1127
- "name": "active_organization_member_id",
1128
- "type": "text",
1129
- "primaryKey": false,
1130
- "notNull": false,
1131
- "autoincrement": false
1132
- },
1133
- "active_organization_role": {
1134
- "name": "active_organization_role",
1135
- "type": "text",
1136
- "primaryKey": false,
1137
- "notNull": false,
1138
- "autoincrement": false
1139
- },
1140
- "active_organization_type": {
1141
- "name": "active_organization_type",
1142
- "type": "text",
1143
- "primaryKey": false,
1144
- "notNull": false,
1145
- "autoincrement": false
1146
- },
1147
- "active_team_id": {
1148
- "name": "active_team_id",
1149
- "type": "text",
1150
- "primaryKey": false,
1151
- "notNull": false,
1152
- "autoincrement": false
1153
- },
1154
- "active_team_role": {
1155
- "name": "active_team_role",
1156
- "type": "text",
1157
- "primaryKey": false,
1158
- "notNull": false,
1159
- "autoincrement": false
1160
- }
1161
- },
1162
- "indexes": {
1163
- "sessions_token_unique": {
1164
- "name": "sessions_token_unique",
1165
- "columns": ["token"],
1166
- "isUnique": true
1167
- }
1168
- },
1169
- "foreignKeys": {
1170
- "sessions_user_id_users_id_fk": {
1171
- "name": "sessions_user_id_users_id_fk",
1172
- "tableFrom": "sessions",
1173
- "tableTo": "users",
1174
- "columnsFrom": ["user_id"],
1175
- "columnsTo": ["id"],
1176
- "onDelete": "cascade",
1177
- "onUpdate": "no action"
1178
- }
1179
- },
1180
- "compositePrimaryKeys": {},
1181
- "uniqueConstraints": {},
1182
- "checkConstraints": {}
1183
- },
1184
- "teammembers": {
1185
- "name": "teammembers",
1186
- "columns": {
1187
- "id": {
1188
- "name": "id",
1189
- "type": "text",
1190
- "primaryKey": true,
1191
- "notNull": true,
1192
- "autoincrement": false
1193
- },
1194
- "team_id": {
1195
- "name": "team_id",
1196
- "type": "text",
1197
- "primaryKey": false,
1198
- "notNull": true,
1199
- "autoincrement": false
1200
- },
1201
- "user_id": {
1202
- "name": "user_id",
1203
- "type": "text",
1204
- "primaryKey": false,
1205
- "notNull": true,
1206
- "autoincrement": false
1207
- },
1208
- "role": {
1209
- "name": "role",
1210
- "type": "text",
1211
- "primaryKey": false,
1212
- "notNull": true,
1213
- "autoincrement": false
1214
- },
1215
- "created_at": {
1216
- "name": "created_at",
1217
- "type": "integer",
1218
- "primaryKey": false,
1219
- "notNull": true,
1220
- "autoincrement": false
1221
- }
1222
- },
1223
- "indexes": {},
1224
- "foreignKeys": {
1225
- "teammembers_team_id_teams_id_fk": {
1226
- "name": "teammembers_team_id_teams_id_fk",
1227
- "tableFrom": "teammembers",
1228
- "tableTo": "teams",
1229
- "columnsFrom": ["team_id"],
1230
- "columnsTo": ["id"],
1231
- "onDelete": "no action",
1232
- "onUpdate": "no action"
1233
- },
1234
- "teammembers_user_id_users_id_fk": {
1235
- "name": "teammembers_user_id_users_id_fk",
1236
- "tableFrom": "teammembers",
1237
- "tableTo": "users",
1238
- "columnsFrom": ["user_id"],
1239
- "columnsTo": ["id"],
1240
- "onDelete": "no action",
1241
- "onUpdate": "no action"
1242
- }
1243
- },
1244
- "compositePrimaryKeys": {},
1245
- "uniqueConstraints": {},
1246
- "checkConstraints": {}
1247
- },
1248
- "teams": {
1249
- "name": "teams",
1250
- "columns": {
1251
- "id": {
1252
- "name": "id",
1253
- "type": "text",
1254
- "primaryKey": true,
1255
- "notNull": true,
1256
- "autoincrement": false
1257
- },
1258
- "name": {
1259
- "name": "name",
1260
- "type": "text",
1261
- "primaryKey": false,
1262
- "notNull": true,
1263
- "autoincrement": false
1264
- },
1265
- "organization_id": {
1266
- "name": "organization_id",
1267
- "type": "text",
1268
- "primaryKey": false,
1269
- "notNull": true,
1270
- "autoincrement": false
1271
- },
1272
- "created_at": {
1273
- "name": "created_at",
1274
- "type": "integer",
1275
- "primaryKey": false,
1276
- "notNull": true,
1277
- "autoincrement": false
1278
- },
1279
- "updated_at": {
1280
- "name": "updated_at",
1281
- "type": "integer",
1282
- "primaryKey": false,
1283
- "notNull": false,
1284
- "autoincrement": false
1285
- }
1286
- },
1287
- "indexes": {},
1288
- "foreignKeys": {
1289
- "teams_organization_id_organizations_id_fk": {
1290
- "name": "teams_organization_id_organizations_id_fk",
1291
- "tableFrom": "teams",
1292
- "tableTo": "organizations",
1293
- "columnsFrom": ["organization_id"],
1294
- "columnsTo": ["id"],
1295
- "onDelete": "no action",
1296
- "onUpdate": "no action"
1297
- }
1298
- },
1299
- "compositePrimaryKeys": {},
1300
- "uniqueConstraints": {},
1301
- "checkConstraints": {}
1302
- },
1303
- "users": {
1304
- "name": "users",
1305
- "columns": {
1306
- "id": {
1307
- "name": "id",
1308
- "type": "text",
1309
- "primaryKey": true,
1310
- "notNull": true,
1311
- "autoincrement": false
1312
- },
1313
- "name": {
1314
- "name": "name",
1315
- "type": "text",
1316
- "primaryKey": false,
1317
- "notNull": true,
1318
- "autoincrement": false
1319
- },
1320
- "email": {
1321
- "name": "email",
1322
- "type": "text",
1323
- "primaryKey": false,
1324
- "notNull": true,
1325
- "autoincrement": false
1326
- },
1327
- "email_verified": {
1328
- "name": "email_verified",
1329
- "type": "integer",
1330
- "primaryKey": false,
1331
- "notNull": true,
1332
- "autoincrement": false
1333
- },
1334
- "image": {
1335
- "name": "image",
1336
- "type": "text",
1337
- "primaryKey": false,
1338
- "notNull": false,
1339
- "autoincrement": false
1340
- },
1341
- "created_at": {
1342
- "name": "created_at",
1343
- "type": "integer",
1344
- "primaryKey": false,
1345
- "notNull": true,
1346
- "autoincrement": false
1347
- },
1348
- "updated_at": {
1349
- "name": "updated_at",
1350
- "type": "integer",
1351
- "primaryKey": false,
1352
- "notNull": true,
1353
- "autoincrement": false
1354
- },
1355
- "role": {
1356
- "name": "role",
1357
- "type": "text",
1358
- "primaryKey": false,
1359
- "notNull": false,
1360
- "autoincrement": false
1361
- },
1362
- "banned": {
1363
- "name": "banned",
1364
- "type": "integer",
1365
- "primaryKey": false,
1366
- "notNull": false,
1367
- "autoincrement": false
1368
- },
1369
- "ban_reason": {
1370
- "name": "ban_reason",
1371
- "type": "text",
1372
- "primaryKey": false,
1373
- "notNull": false,
1374
- "autoincrement": false
1375
- },
1376
- "ban_expires": {
1377
- "name": "ban_expires",
1378
- "type": "integer",
1379
- "primaryKey": false,
1380
- "notNull": false,
1381
- "autoincrement": false
1382
- },
1383
- "stripe_customer_id": {
1384
- "name": "stripe_customer_id",
1385
- "type": "text",
1386
- "primaryKey": false,
1387
- "notNull": false,
1388
- "autoincrement": false
1389
- },
1390
- "payment_customer_id": {
1391
- "name": "payment_customer_id",
1392
- "type": "text",
1393
- "primaryKey": false,
1394
- "notNull": false,
1395
- "autoincrement": false
1396
- },
1397
- "payment_plan_tier": {
1398
- "name": "payment_plan_tier",
1399
- "type": "text",
1400
- "primaryKey": false,
1401
- "notNull": false,
1402
- "autoincrement": false
1403
- },
1404
- "payment_plan_expires_at": {
1405
- "name": "payment_plan_expires_at",
1406
- "type": "integer",
1407
- "primaryKey": false,
1408
- "notNull": false,
1409
- "autoincrement": false
1410
- },
1411
- "preferences": {
1412
- "name": "preferences",
1413
- "type": "text",
1414
- "primaryKey": false,
1415
- "notNull": false,
1416
- "autoincrement": false,
1417
- "default": "'{}'"
1418
- },
1419
- "metadata": {
1420
- "name": "metadata",
1421
- "type": "text",
1422
- "primaryKey": false,
1423
- "notNull": false,
1424
- "autoincrement": false,
1425
- "default": "'{}'"
1426
- },
1427
- "onboarding": {
1428
- "name": "onboarding",
1429
- "type": "integer",
1430
- "primaryKey": false,
1431
- "notNull": false,
1432
- "autoincrement": false
1433
- },
1434
- "flags": {
1435
- "name": "flags",
1436
- "type": "text",
1437
- "primaryKey": false,
1438
- "notNull": false,
1439
- "autoincrement": false,
1440
- "default": "'[]'"
1441
- },
1442
- "locale": {
1443
- "name": "locale",
1444
- "type": "text",
1445
- "primaryKey": false,
1446
- "notNull": false,
1447
- "autoincrement": false
1448
- }
1449
- },
1450
- "indexes": {
1451
- "users_email_unique": {
1452
- "name": "users_email_unique",
1453
- "columns": ["email"],
1454
- "isUnique": true
1455
- },
1456
- "users_stripe_customer_id_unique": {
1457
- "name": "users_stripe_customer_id_unique",
1458
- "columns": ["stripe_customer_id"],
1459
- "isUnique": true
1460
- },
1461
- "users_payment_customer_id_unique": {
1462
- "name": "users_payment_customer_id_unique",
1463
- "columns": ["payment_customer_id"],
1464
- "isUnique": true
1465
- }
1466
- },
1467
- "foreignKeys": {},
1468
- "compositePrimaryKeys": {},
1469
- "uniqueConstraints": {},
1470
- "checkConstraints": {}
1471
- },
1472
- "verifications": {
1473
- "name": "verifications",
1474
- "columns": {
1475
- "id": {
1476
- "name": "id",
1477
- "type": "text",
1478
- "primaryKey": true,
1479
- "notNull": true,
1480
- "autoincrement": false
1481
- },
1482
- "identifier": {
1483
- "name": "identifier",
1484
- "type": "text",
1485
- "primaryKey": false,
1486
- "notNull": true,
1487
- "autoincrement": false
1488
- },
1489
- "value": {
1490
- "name": "value",
1491
- "type": "text",
1492
- "primaryKey": false,
1493
- "notNull": true,
1494
- "autoincrement": false
1495
- },
1496
- "expires_at": {
1497
- "name": "expires_at",
1498
- "type": "integer",
1499
- "primaryKey": false,
1500
- "notNull": true,
1501
- "autoincrement": false
1502
- },
1503
- "created_at": {
1504
- "name": "created_at",
1505
- "type": "integer",
1506
- "primaryKey": false,
1507
- "notNull": false,
1508
- "autoincrement": false
1509
- },
1510
- "updated_at": {
1511
- "name": "updated_at",
1512
- "type": "integer",
1513
- "primaryKey": false,
1514
- "notNull": false,
1515
- "autoincrement": false
1516
- }
1517
- },
1518
- "indexes": {},
1519
- "foreignKeys": {},
1520
- "compositePrimaryKeys": {},
1521
- "uniqueConstraints": {},
1522
- "checkConstraints": {}
1523
- },
1524
- "waitlist": {
1525
- "name": "waitlist",
1526
- "columns": {
1527
- "id": {
1528
- "name": "id",
1529
- "type": "text",
1530
- "primaryKey": true,
1531
- "notNull": true,
1532
- "autoincrement": false
1533
- },
1534
- "name": {
1535
- "name": "name",
1536
- "type": "text",
1537
- "primaryKey": false,
1538
- "notNull": false,
1539
- "autoincrement": false
1540
- },
1541
- "email": {
1542
- "name": "email",
1543
- "type": "text",
1544
- "primaryKey": false,
1545
- "notNull": false,
1546
- "autoincrement": false
1547
- },
1548
- "created_at": {
1549
- "name": "created_at",
1550
- "type": "integer",
1551
- "primaryKey": false,
1552
- "notNull": true,
1553
- "autoincrement": false
1554
- },
1555
- "updated_at": {
1556
- "name": "updated_at",
1557
- "type": "integer",
1558
- "primaryKey": false,
1559
- "notNull": false,
1560
- "autoincrement": false
1561
- },
1562
- "status": {
1563
- "name": "status",
1564
- "type": "text",
1565
- "primaryKey": false,
1566
- "notNull": true,
1567
- "autoincrement": false,
1568
- "default": "'WAITLIST'"
1569
- },
1570
- "type": {
1571
- "name": "type",
1572
- "type": "text",
1573
- "primaryKey": false,
1574
- "notNull": true,
1575
- "autoincrement": false,
1576
- "default": "'WAITLIST'"
1577
- },
1578
- "code": {
1579
- "name": "code",
1580
- "type": "text",
1581
- "primaryKey": false,
1582
- "notNull": false,
1583
- "autoincrement": false
1584
- },
1585
- "expires_at": {
1586
- "name": "expires_at",
1587
- "type": "integer",
1588
- "primaryKey": false,
1589
- "notNull": false,
1590
- "autoincrement": false
1591
- },
1592
- "user_id": {
1593
- "name": "user_id",
1594
- "type": "text",
1595
- "primaryKey": false,
1596
- "notNull": false,
1597
- "autoincrement": false
1598
- },
1599
- "claim_user_id": {
1600
- "name": "claim_user_id",
1601
- "type": "text",
1602
- "primaryKey": false,
1603
- "notNull": false,
1604
- "autoincrement": false
1605
- },
1606
- "claimed_at": {
1607
- "name": "claimed_at",
1608
- "type": "integer",
1609
- "primaryKey": false,
1610
- "notNull": false,
1611
- "autoincrement": false
1612
- },
1613
- "claimed_email": {
1614
- "name": "claimed_email",
1615
- "type": "text",
1616
- "primaryKey": false,
1617
- "notNull": false,
1618
- "autoincrement": false
1619
- }
1620
- },
1621
- "indexes": {},
1622
- "foreignKeys": {
1623
- "waitlist_user_id_users_id_fk": {
1624
- "name": "waitlist_user_id_users_id_fk",
1625
- "tableFrom": "waitlist",
1626
- "tableTo": "users",
1627
- "columnsFrom": ["user_id"],
1628
- "columnsTo": ["id"],
1629
- "onDelete": "no action",
1630
- "onUpdate": "no action"
1631
- },
1632
- "waitlist_claim_user_id_users_id_fk": {
1633
- "name": "waitlist_claim_user_id_users_id_fk",
1634
- "tableFrom": "waitlist",
1635
- "tableTo": "users",
1636
- "columnsFrom": ["claim_user_id"],
1637
- "columnsTo": ["id"],
1638
- "onDelete": "no action",
1639
- "onUpdate": "no action"
1640
- }
1641
- },
1642
- "compositePrimaryKeys": {},
1643
- "uniqueConstraints": {},
1644
- "checkConstraints": {}
1645
- },
1646
- "workflows": {
1647
- "name": "workflows",
1648
- "columns": {
1649
- "id": {
1650
- "name": "id",
1651
- "type": "text",
1652
- "primaryKey": true,
1653
- "notNull": true,
1654
- "autoincrement": false
1655
- },
1656
- "user_id": {
1657
- "name": "user_id",
1658
- "type": "text",
1659
- "primaryKey": false,
1660
- "notNull": false,
1661
- "autoincrement": false
1662
- },
1663
- "job_id": {
1664
- "name": "job_id",
1665
- "type": "text",
1666
- "primaryKey": false,
1667
- "notNull": true,
1668
- "autoincrement": false
1669
- },
1670
- "job_name": {
1671
- "name": "job_name",
1672
- "type": "text",
1673
- "primaryKey": false,
1674
- "notNull": true,
1675
- "autoincrement": false
1676
- },
1677
- "queue_name": {
1678
- "name": "queue_name",
1679
- "type": "text",
1680
- "primaryKey": false,
1681
- "notNull": true,
1682
- "autoincrement": false
1683
- },
1684
- "timeout": {
1685
- "name": "timeout",
1686
- "type": "integer",
1687
- "primaryKey": false,
1688
- "notNull": false,
1689
- "autoincrement": false
1690
- },
1691
- "tags": {
1692
- "name": "tags",
1693
- "type": "text",
1694
- "primaryKey": false,
1695
- "notNull": false,
1696
- "autoincrement": false
1697
- },
1698
- "input": {
1699
- "name": "input",
1700
- "type": "text",
1701
- "primaryKey": false,
1702
- "notNull": false,
1703
- "autoincrement": false
1704
- },
1705
- "output": {
1706
- "name": "output",
1707
- "type": "text",
1708
- "primaryKey": false,
1709
- "notNull": false,
1710
- "autoincrement": false
1711
- },
1712
- "status": {
1713
- "name": "status",
1714
- "type": "text",
1715
- "primaryKey": false,
1716
- "notNull": true,
1717
- "autoincrement": false
1718
- },
1719
- "error": {
1720
- "name": "error",
1721
- "type": "text",
1722
- "primaryKey": false,
1723
- "notNull": false,
1724
- "autoincrement": false
1725
- },
1726
- "retries": {
1727
- "name": "retries",
1728
- "type": "integer",
1729
- "primaryKey": false,
1730
- "notNull": true,
1731
- "autoincrement": false,
1732
- "default": 0
1733
- },
1734
- "finished_at": {
1735
- "name": "finished_at",
1736
- "type": "integer",
1737
- "primaryKey": false,
1738
- "notNull": false,
1739
- "autoincrement": false
1740
- },
1741
- "processed_at": {
1742
- "name": "processed_at",
1743
- "type": "integer",
1744
- "primaryKey": false,
1745
- "notNull": false,
1746
- "autoincrement": false
1747
- },
1748
- "created_at": {
1749
- "name": "created_at",
1750
- "type": "integer",
1751
- "primaryKey": false,
1752
- "notNull": true,
1753
- "autoincrement": false
1754
- },
1755
- "updated_at": {
1756
- "name": "updated_at",
1757
- "type": "integer",
1758
- "primaryKey": false,
1759
- "notNull": true,
1760
- "autoincrement": false
1761
- }
1762
- },
1763
- "indexes": {
1764
- "workflows_job_id_unique": {
1765
- "name": "workflows_job_id_unique",
1766
- "columns": ["job_id"],
1767
- "isUnique": true
1768
- }
1769
- },
1770
- "foreignKeys": {
1771
- "workflows_user_id_users_id_fk": {
1772
- "name": "workflows_user_id_users_id_fk",
1773
- "tableFrom": "workflows",
1774
- "tableTo": "users",
1775
- "columnsFrom": ["user_id"],
1776
- "columnsTo": ["id"],
1777
- "onDelete": "cascade",
1778
- "onUpdate": "no action"
1779
- }
1780
- },
1781
- "compositePrimaryKeys": {},
1782
- "uniqueConstraints": {},
1783
- "checkConstraints": {}
1784
- }
1785
- },
1786
- "views": {},
1787
- "enums": {},
1788
- "_meta": {
1789
- "schemas": {},
1790
- "tables": {},
1791
- "columns": {}
1792
- },
1793
- "internal": {
1794
- "indexes": {}
1795
- }
1796
- }
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "cb90e0fb-e7a8-4079-8400-f45f635afaa2",
5
+ "prevId": "cf910405-4a7f-4ee4-a555-bfc0321fc1ce",
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
+ "member_id": {
857
+ "name": "member_id",
858
+ "type": "text",
859
+ "primaryKey": false,
860
+ "notNull": false,
861
+ "autoincrement": false
862
+ },
863
+ "email": {
864
+ "name": "email",
865
+ "type": "text",
866
+ "primaryKey": false,
867
+ "notNull": true,
868
+ "autoincrement": false
869
+ },
870
+ "role": {
871
+ "name": "role",
872
+ "type": "text",
873
+ "primaryKey": false,
874
+ "notNull": false,
875
+ "autoincrement": false
876
+ },
877
+ "status": {
878
+ "name": "status",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": true,
882
+ "autoincrement": false
883
+ },
884
+ "created_at": {
885
+ "name": "created_at",
886
+ "type": "integer",
887
+ "primaryKey": false,
888
+ "notNull": true,
889
+ "autoincrement": false
890
+ },
891
+ "expires_at": {
892
+ "name": "expires_at",
893
+ "type": "integer",
894
+ "primaryKey": false,
895
+ "notNull": true,
896
+ "autoincrement": false
897
+ },
898
+ "inviter_id": {
899
+ "name": "inviter_id",
900
+ "type": "text",
901
+ "primaryKey": false,
902
+ "notNull": true,
903
+ "autoincrement": false
904
+ }
905
+ },
906
+ "indexes": {},
907
+ "foreignKeys": {
908
+ "invitations_organization_id_organizations_id_fk": {
909
+ "name": "invitations_organization_id_organizations_id_fk",
910
+ "tableFrom": "invitations",
911
+ "tableTo": "organizations",
912
+ "columnsFrom": [
913
+ "organization_id"
914
+ ],
915
+ "columnsTo": [
916
+ "id"
917
+ ],
918
+ "onDelete": "no action",
919
+ "onUpdate": "no action"
920
+ },
921
+ "invitations_team_id_teams_id_fk": {
922
+ "name": "invitations_team_id_teams_id_fk",
923
+ "tableFrom": "invitations",
924
+ "tableTo": "teams",
925
+ "columnsFrom": [
926
+ "team_id"
927
+ ],
928
+ "columnsTo": [
929
+ "id"
930
+ ],
931
+ "onDelete": "no action",
932
+ "onUpdate": "no action"
933
+ },
934
+ "invitations_member_id_members_id_fk": {
935
+ "name": "invitations_member_id_members_id_fk",
936
+ "tableFrom": "invitations",
937
+ "tableTo": "members",
938
+ "columnsFrom": [
939
+ "member_id"
940
+ ],
941
+ "columnsTo": [
942
+ "id"
943
+ ],
944
+ "onDelete": "no action",
945
+ "onUpdate": "no action"
946
+ },
947
+ "invitations_inviter_id_users_id_fk": {
948
+ "name": "invitations_inviter_id_users_id_fk",
949
+ "tableFrom": "invitations",
950
+ "tableTo": "users",
951
+ "columnsFrom": [
952
+ "inviter_id"
953
+ ],
954
+ "columnsTo": [
955
+ "id"
956
+ ],
957
+ "onDelete": "no action",
958
+ "onUpdate": "no action"
959
+ }
960
+ },
961
+ "compositePrimaryKeys": {},
962
+ "uniqueConstraints": {},
963
+ "checkConstraints": {}
964
+ },
965
+ "members": {
966
+ "name": "members",
967
+ "columns": {
968
+ "id": {
969
+ "name": "id",
970
+ "type": "text",
971
+ "primaryKey": true,
972
+ "notNull": true,
973
+ "autoincrement": false
974
+ },
975
+ "organization_id": {
976
+ "name": "organization_id",
977
+ "type": "text",
978
+ "primaryKey": false,
979
+ "notNull": true,
980
+ "autoincrement": false
981
+ },
982
+ "user_id": {
983
+ "name": "user_id",
984
+ "type": "text",
985
+ "primaryKey": false,
986
+ "notNull": false,
987
+ "autoincrement": false
988
+ },
989
+ "email": {
990
+ "name": "email",
991
+ "type": "text",
992
+ "primaryKey": false,
993
+ "notNull": false,
994
+ "autoincrement": false
995
+ },
996
+ "name": {
997
+ "name": "name",
998
+ "type": "text",
999
+ "primaryKey": false,
1000
+ "notNull": true,
1001
+ "autoincrement": false,
1002
+ "default": "''"
1003
+ },
1004
+ "image": {
1005
+ "name": "image",
1006
+ "type": "text",
1007
+ "primaryKey": false,
1008
+ "notNull": false,
1009
+ "autoincrement": false
1010
+ },
1011
+ "role": {
1012
+ "name": "role",
1013
+ "type": "text",
1014
+ "primaryKey": false,
1015
+ "notNull": true,
1016
+ "autoincrement": false
1017
+ },
1018
+ "created_at": {
1019
+ "name": "created_at",
1020
+ "type": "integer",
1021
+ "primaryKey": false,
1022
+ "notNull": true,
1023
+ "autoincrement": false
1024
+ },
1025
+ "deleted_at": {
1026
+ "name": "deleted_at",
1027
+ "type": "integer",
1028
+ "primaryKey": false,
1029
+ "notNull": false,
1030
+ "autoincrement": false
1031
+ },
1032
+ "preferences": {
1033
+ "name": "preferences",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": false,
1037
+ "autoincrement": false,
1038
+ "default": "'{}'"
1039
+ },
1040
+ "metadata": {
1041
+ "name": "metadata",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": false,
1045
+ "autoincrement": false,
1046
+ "default": "'{}'"
1047
+ },
1048
+ "onboarding": {
1049
+ "name": "onboarding",
1050
+ "type": "integer",
1051
+ "primaryKey": false,
1052
+ "notNull": false,
1053
+ "autoincrement": false
1054
+ },
1055
+ "flags": {
1056
+ "name": "flags",
1057
+ "type": "text",
1058
+ "primaryKey": false,
1059
+ "notNull": false,
1060
+ "autoincrement": false,
1061
+ "default": "'[]'"
1062
+ }
1063
+ },
1064
+ "indexes": {
1065
+ "members_attached_user_organization_unique": {
1066
+ "name": "members_attached_user_organization_unique",
1067
+ "columns": [
1068
+ "user_id",
1069
+ "organization_id"
1070
+ ],
1071
+ "isUnique": true,
1072
+ "where": "\"members\".\"user_id\" is not null"
1073
+ },
1074
+ "members_live_pending_email_organization_unique": {
1075
+ "name": "members_live_pending_email_organization_unique",
1076
+ "columns": [
1077
+ "email",
1078
+ "organization_id"
1079
+ ],
1080
+ "isUnique": true,
1081
+ "where": "\"members\".\"user_id\" is null and \"members\".\"deleted_at\" is null"
1082
+ }
1083
+ },
1084
+ "foreignKeys": {
1085
+ "members_organization_id_organizations_id_fk": {
1086
+ "name": "members_organization_id_organizations_id_fk",
1087
+ "tableFrom": "members",
1088
+ "tableTo": "organizations",
1089
+ "columnsFrom": [
1090
+ "organization_id"
1091
+ ],
1092
+ "columnsTo": [
1093
+ "id"
1094
+ ],
1095
+ "onDelete": "no action",
1096
+ "onUpdate": "no action"
1097
+ },
1098
+ "members_user_id_users_id_fk": {
1099
+ "name": "members_user_id_users_id_fk",
1100
+ "tableFrom": "members",
1101
+ "tableTo": "users",
1102
+ "columnsFrom": [
1103
+ "user_id"
1104
+ ],
1105
+ "columnsTo": [
1106
+ "id"
1107
+ ],
1108
+ "onDelete": "no action",
1109
+ "onUpdate": "no action"
1110
+ }
1111
+ },
1112
+ "compositePrimaryKeys": {},
1113
+ "uniqueConstraints": {},
1114
+ "checkConstraints": {}
1115
+ },
1116
+ "notification_devices": {
1117
+ "name": "notification_devices",
1118
+ "columns": {
1119
+ "id": {
1120
+ "name": "id",
1121
+ "type": "text",
1122
+ "primaryKey": true,
1123
+ "notNull": true,
1124
+ "autoincrement": false
1125
+ },
1126
+ "user_id": {
1127
+ "name": "user_id",
1128
+ "type": "text",
1129
+ "primaryKey": false,
1130
+ "notNull": true,
1131
+ "autoincrement": false
1132
+ },
1133
+ "platform": {
1134
+ "name": "platform",
1135
+ "type": "text",
1136
+ "primaryKey": false,
1137
+ "notNull": true,
1138
+ "autoincrement": false
1139
+ },
1140
+ "endpoint": {
1141
+ "name": "endpoint",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": false,
1145
+ "autoincrement": false
1146
+ },
1147
+ "subscription": {
1148
+ "name": "subscription",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": false,
1152
+ "autoincrement": false
1153
+ },
1154
+ "token": {
1155
+ "name": "token",
1156
+ "type": "text",
1157
+ "primaryKey": false,
1158
+ "notNull": false,
1159
+ "autoincrement": false
1160
+ },
1161
+ "label": {
1162
+ "name": "label",
1163
+ "type": "text",
1164
+ "primaryKey": false,
1165
+ "notNull": false,
1166
+ "autoincrement": false
1167
+ },
1168
+ "enabled": {
1169
+ "name": "enabled",
1170
+ "type": "integer",
1171
+ "primaryKey": false,
1172
+ "notNull": true,
1173
+ "autoincrement": false,
1174
+ "default": true
1175
+ },
1176
+ "created_at": {
1177
+ "name": "created_at",
1178
+ "type": "integer",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
1181
+ "autoincrement": false
1182
+ },
1183
+ "updated_at": {
1184
+ "name": "updated_at",
1185
+ "type": "integer",
1186
+ "primaryKey": false,
1187
+ "notNull": true,
1188
+ "autoincrement": false
1189
+ }
1190
+ },
1191
+ "indexes": {
1192
+ "notification_devices_endpoint_unique": {
1193
+ "name": "notification_devices_endpoint_unique",
1194
+ "columns": [
1195
+ "endpoint"
1196
+ ],
1197
+ "isUnique": true
1198
+ },
1199
+ "notification_devices_token_unique": {
1200
+ "name": "notification_devices_token_unique",
1201
+ "columns": [
1202
+ "token"
1203
+ ],
1204
+ "isUnique": true
1205
+ }
1206
+ },
1207
+ "foreignKeys": {
1208
+ "notification_devices_user_id_users_id_fk": {
1209
+ "name": "notification_devices_user_id_users_id_fk",
1210
+ "tableFrom": "notification_devices",
1211
+ "tableTo": "users",
1212
+ "columnsFrom": [
1213
+ "user_id"
1214
+ ],
1215
+ "columnsTo": [
1216
+ "id"
1217
+ ],
1218
+ "onDelete": "cascade",
1219
+ "onUpdate": "no action"
1220
+ }
1221
+ },
1222
+ "compositePrimaryKeys": {},
1223
+ "uniqueConstraints": {},
1224
+ "checkConstraints": {}
1225
+ },
1226
+ "notification_preferences": {
1227
+ "name": "notification_preferences",
1228
+ "columns": {
1229
+ "id": {
1230
+ "name": "id",
1231
+ "type": "text",
1232
+ "primaryKey": true,
1233
+ "notNull": true,
1234
+ "autoincrement": false
1235
+ },
1236
+ "member_id": {
1237
+ "name": "member_id",
1238
+ "type": "text",
1239
+ "primaryKey": false,
1240
+ "notNull": true,
1241
+ "autoincrement": false
1242
+ },
1243
+ "kind": {
1244
+ "name": "kind",
1245
+ "type": "text",
1246
+ "primaryKey": false,
1247
+ "notNull": true,
1248
+ "autoincrement": false
1249
+ },
1250
+ "channel": {
1251
+ "name": "channel",
1252
+ "type": "text",
1253
+ "primaryKey": false,
1254
+ "notNull": true,
1255
+ "autoincrement": false
1256
+ },
1257
+ "created_at": {
1258
+ "name": "created_at",
1259
+ "type": "integer",
1260
+ "primaryKey": false,
1261
+ "notNull": true,
1262
+ "autoincrement": false
1263
+ },
1264
+ "updated_at": {
1265
+ "name": "updated_at",
1266
+ "type": "integer",
1267
+ "primaryKey": false,
1268
+ "notNull": true,
1269
+ "autoincrement": false
1270
+ }
1271
+ },
1272
+ "indexes": {
1273
+ "notification_preferences_member_kind_channel_unique": {
1274
+ "name": "notification_preferences_member_kind_channel_unique",
1275
+ "columns": [
1276
+ "member_id",
1277
+ "kind",
1278
+ "channel"
1279
+ ],
1280
+ "isUnique": true
1281
+ }
1282
+ },
1283
+ "foreignKeys": {
1284
+ "notification_preferences_member_id_members_id_fk": {
1285
+ "name": "notification_preferences_member_id_members_id_fk",
1286
+ "tableFrom": "notification_preferences",
1287
+ "tableTo": "members",
1288
+ "columnsFrom": [
1289
+ "member_id"
1290
+ ],
1291
+ "columnsTo": [
1292
+ "id"
1293
+ ],
1294
+ "onDelete": "cascade",
1295
+ "onUpdate": "no action"
1296
+ }
1297
+ },
1298
+ "compositePrimaryKeys": {},
1299
+ "uniqueConstraints": {},
1300
+ "checkConstraints": {}
1301
+ },
1302
+ "notification_send_logs": {
1303
+ "name": "notification_send_logs",
1304
+ "columns": {
1305
+ "id": {
1306
+ "name": "id",
1307
+ "type": "text",
1308
+ "primaryKey": true,
1309
+ "notNull": true,
1310
+ "autoincrement": false
1311
+ },
1312
+ "batch_id": {
1313
+ "name": "batch_id",
1314
+ "type": "text",
1315
+ "primaryKey": false,
1316
+ "notNull": true,
1317
+ "autoincrement": false
1318
+ },
1319
+ "notification_id": {
1320
+ "name": "notification_id",
1321
+ "type": "text",
1322
+ "primaryKey": false,
1323
+ "notNull": true,
1324
+ "autoincrement": false
1325
+ },
1326
+ "user_id": {
1327
+ "name": "user_id",
1328
+ "type": "text",
1329
+ "primaryKey": false,
1330
+ "notNull": true,
1331
+ "autoincrement": false
1332
+ },
1333
+ "device_id": {
1334
+ "name": "device_id",
1335
+ "type": "text",
1336
+ "primaryKey": false,
1337
+ "notNull": false,
1338
+ "autoincrement": false
1339
+ },
1340
+ "channel": {
1341
+ "name": "channel",
1342
+ "type": "text",
1343
+ "primaryKey": false,
1344
+ "notNull": true,
1345
+ "autoincrement": false
1346
+ },
1347
+ "provider": {
1348
+ "name": "provider",
1349
+ "type": "text",
1350
+ "primaryKey": false,
1351
+ "notNull": false,
1352
+ "autoincrement": false
1353
+ },
1354
+ "title": {
1355
+ "name": "title",
1356
+ "type": "text",
1357
+ "primaryKey": false,
1358
+ "notNull": true,
1359
+ "autoincrement": false
1360
+ },
1361
+ "body": {
1362
+ "name": "body",
1363
+ "type": "text",
1364
+ "primaryKey": false,
1365
+ "notNull": true,
1366
+ "autoincrement": false
1367
+ },
1368
+ "data": {
1369
+ "name": "data",
1370
+ "type": "text",
1371
+ "primaryKey": false,
1372
+ "notNull": false,
1373
+ "autoincrement": false
1374
+ },
1375
+ "status": {
1376
+ "name": "status",
1377
+ "type": "text",
1378
+ "primaryKey": false,
1379
+ "notNull": true,
1380
+ "autoincrement": false
1381
+ },
1382
+ "error": {
1383
+ "name": "error",
1384
+ "type": "text",
1385
+ "primaryKey": false,
1386
+ "notNull": false,
1387
+ "autoincrement": false
1388
+ },
1389
+ "job_id": {
1390
+ "name": "job_id",
1391
+ "type": "text",
1392
+ "primaryKey": false,
1393
+ "notNull": false,
1394
+ "autoincrement": false
1395
+ },
1396
+ "created_at": {
1397
+ "name": "created_at",
1398
+ "type": "integer",
1399
+ "primaryKey": false,
1400
+ "notNull": true,
1401
+ "autoincrement": false
1402
+ },
1403
+ "updated_at": {
1404
+ "name": "updated_at",
1405
+ "type": "integer",
1406
+ "primaryKey": false,
1407
+ "notNull": true,
1408
+ "autoincrement": false
1409
+ }
1410
+ },
1411
+ "indexes": {},
1412
+ "foreignKeys": {
1413
+ "notification_send_logs_notification_id_notifications_id_fk": {
1414
+ "name": "notification_send_logs_notification_id_notifications_id_fk",
1415
+ "tableFrom": "notification_send_logs",
1416
+ "tableTo": "notifications",
1417
+ "columnsFrom": [
1418
+ "notification_id"
1419
+ ],
1420
+ "columnsTo": [
1421
+ "id"
1422
+ ],
1423
+ "onDelete": "cascade",
1424
+ "onUpdate": "no action"
1425
+ },
1426
+ "notification_send_logs_user_id_users_id_fk": {
1427
+ "name": "notification_send_logs_user_id_users_id_fk",
1428
+ "tableFrom": "notification_send_logs",
1429
+ "tableTo": "users",
1430
+ "columnsFrom": [
1431
+ "user_id"
1432
+ ],
1433
+ "columnsTo": [
1434
+ "id"
1435
+ ],
1436
+ "onDelete": "cascade",
1437
+ "onUpdate": "no action"
1438
+ },
1439
+ "notification_send_logs_device_id_notification_devices_id_fk": {
1440
+ "name": "notification_send_logs_device_id_notification_devices_id_fk",
1441
+ "tableFrom": "notification_send_logs",
1442
+ "tableTo": "notification_devices",
1443
+ "columnsFrom": [
1444
+ "device_id"
1445
+ ],
1446
+ "columnsTo": [
1447
+ "id"
1448
+ ],
1449
+ "onDelete": "set null",
1450
+ "onUpdate": "no action"
1451
+ }
1452
+ },
1453
+ "compositePrimaryKeys": {},
1454
+ "uniqueConstraints": {},
1455
+ "checkConstraints": {}
1456
+ },
1457
+ "notifications": {
1458
+ "name": "notifications",
1459
+ "columns": {
1460
+ "id": {
1461
+ "name": "id",
1462
+ "type": "text",
1463
+ "primaryKey": true,
1464
+ "notNull": true,
1465
+ "autoincrement": false
1466
+ },
1467
+ "member_id": {
1468
+ "name": "member_id",
1469
+ "type": "text",
1470
+ "primaryKey": false,
1471
+ "notNull": true,
1472
+ "autoincrement": false
1473
+ },
1474
+ "user_id": {
1475
+ "name": "user_id",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true,
1479
+ "autoincrement": false
1480
+ },
1481
+ "kind": {
1482
+ "name": "kind",
1483
+ "type": "text",
1484
+ "primaryKey": false,
1485
+ "notNull": true,
1486
+ "autoincrement": false
1487
+ },
1488
+ "title": {
1489
+ "name": "title",
1490
+ "type": "text",
1491
+ "primaryKey": false,
1492
+ "notNull": true,
1493
+ "autoincrement": false
1494
+ },
1495
+ "body": {
1496
+ "name": "body",
1497
+ "type": "text",
1498
+ "primaryKey": false,
1499
+ "notNull": true,
1500
+ "autoincrement": false
1501
+ },
1502
+ "data": {
1503
+ "name": "data",
1504
+ "type": "text",
1505
+ "primaryKey": false,
1506
+ "notNull": false,
1507
+ "autoincrement": false
1508
+ },
1509
+ "visible_in_inbox": {
1510
+ "name": "visible_in_inbox",
1511
+ "type": "integer",
1512
+ "primaryKey": false,
1513
+ "notNull": true,
1514
+ "autoincrement": false,
1515
+ "default": false
1516
+ },
1517
+ "armed_channels": {
1518
+ "name": "armed_channels",
1519
+ "type": "text",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "autoincrement": false,
1523
+ "default": "'[]'"
1524
+ },
1525
+ "web_pushed_at": {
1526
+ "name": "web_pushed_at",
1527
+ "type": "integer",
1528
+ "primaryKey": false,
1529
+ "notNull": false,
1530
+ "autoincrement": false
1531
+ },
1532
+ "mobile_pushed_at": {
1533
+ "name": "mobile_pushed_at",
1534
+ "type": "integer",
1535
+ "primaryKey": false,
1536
+ "notNull": false,
1537
+ "autoincrement": false
1538
+ },
1539
+ "emailed_at": {
1540
+ "name": "emailed_at",
1541
+ "type": "integer",
1542
+ "primaryKey": false,
1543
+ "notNull": false,
1544
+ "autoincrement": false
1545
+ },
1546
+ "read_at": {
1547
+ "name": "read_at",
1548
+ "type": "integer",
1549
+ "primaryKey": false,
1550
+ "notNull": false,
1551
+ "autoincrement": false
1552
+ },
1553
+ "created_at": {
1554
+ "name": "created_at",
1555
+ "type": "integer",
1556
+ "primaryKey": false,
1557
+ "notNull": true,
1558
+ "autoincrement": false
1559
+ },
1560
+ "updated_at": {
1561
+ "name": "updated_at",
1562
+ "type": "integer",
1563
+ "primaryKey": false,
1564
+ "notNull": true,
1565
+ "autoincrement": false
1566
+ }
1567
+ },
1568
+ "indexes": {},
1569
+ "foreignKeys": {
1570
+ "notifications_member_id_members_id_fk": {
1571
+ "name": "notifications_member_id_members_id_fk",
1572
+ "tableFrom": "notifications",
1573
+ "tableTo": "members",
1574
+ "columnsFrom": [
1575
+ "member_id"
1576
+ ],
1577
+ "columnsTo": [
1578
+ "id"
1579
+ ],
1580
+ "onDelete": "cascade",
1581
+ "onUpdate": "no action"
1582
+ },
1583
+ "notifications_user_id_users_id_fk": {
1584
+ "name": "notifications_user_id_users_id_fk",
1585
+ "tableFrom": "notifications",
1586
+ "tableTo": "users",
1587
+ "columnsFrom": [
1588
+ "user_id"
1589
+ ],
1590
+ "columnsTo": [
1591
+ "id"
1592
+ ],
1593
+ "onDelete": "cascade",
1594
+ "onUpdate": "no action"
1595
+ }
1596
+ },
1597
+ "compositePrimaryKeys": {},
1598
+ "uniqueConstraints": {},
1599
+ "checkConstraints": {}
1600
+ },
1601
+ "organizations": {
1602
+ "name": "organizations",
1603
+ "columns": {
1604
+ "id": {
1605
+ "name": "id",
1606
+ "type": "text",
1607
+ "primaryKey": true,
1608
+ "notNull": true,
1609
+ "autoincrement": false
1610
+ },
1611
+ "name": {
1612
+ "name": "name",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": true,
1616
+ "autoincrement": false
1617
+ },
1618
+ "slug": {
1619
+ "name": "slug",
1620
+ "type": "text",
1621
+ "primaryKey": false,
1622
+ "notNull": false,
1623
+ "autoincrement": false
1624
+ },
1625
+ "logo": {
1626
+ "name": "logo",
1627
+ "type": "text",
1628
+ "primaryKey": false,
1629
+ "notNull": false,
1630
+ "autoincrement": false
1631
+ },
1632
+ "type": {
1633
+ "name": "type",
1634
+ "type": "text",
1635
+ "primaryKey": false,
1636
+ "notNull": false,
1637
+ "autoincrement": false
1638
+ },
1639
+ "parent_id": {
1640
+ "name": "parent_id",
1641
+ "type": "text",
1642
+ "primaryKey": false,
1643
+ "notNull": false,
1644
+ "autoincrement": false
1645
+ },
1646
+ "created_at": {
1647
+ "name": "created_at",
1648
+ "type": "integer",
1649
+ "primaryKey": false,
1650
+ "notNull": true,
1651
+ "autoincrement": false
1652
+ },
1653
+ "onboarding": {
1654
+ "name": "onboarding",
1655
+ "type": "integer",
1656
+ "primaryKey": false,
1657
+ "notNull": false,
1658
+ "autoincrement": false
1659
+ },
1660
+ "preferences": {
1661
+ "name": "preferences",
1662
+ "type": "text",
1663
+ "primaryKey": false,
1664
+ "notNull": false,
1665
+ "autoincrement": false,
1666
+ "default": "'{}'"
1667
+ },
1668
+ "metadata": {
1669
+ "name": "metadata",
1670
+ "type": "text",
1671
+ "primaryKey": false,
1672
+ "notNull": false,
1673
+ "autoincrement": false,
1674
+ "default": "'{}'"
1675
+ },
1676
+ "flags": {
1677
+ "name": "flags",
1678
+ "type": "text",
1679
+ "primaryKey": false,
1680
+ "notNull": false,
1681
+ "autoincrement": false,
1682
+ "default": "'[]'"
1683
+ },
1684
+ "locale": {
1685
+ "name": "locale",
1686
+ "type": "text",
1687
+ "primaryKey": false,
1688
+ "notNull": false,
1689
+ "autoincrement": false
1690
+ }
1691
+ },
1692
+ "indexes": {
1693
+ "organizations_slug_unique": {
1694
+ "name": "organizations_slug_unique",
1695
+ "columns": [
1696
+ "slug"
1697
+ ],
1698
+ "isUnique": true
1699
+ }
1700
+ },
1701
+ "foreignKeys": {
1702
+ "organizations_parent_id_organizations_id_fk": {
1703
+ "name": "organizations_parent_id_organizations_id_fk",
1704
+ "tableFrom": "organizations",
1705
+ "tableTo": "organizations",
1706
+ "columnsFrom": [
1707
+ "parent_id"
1708
+ ],
1709
+ "columnsTo": [
1710
+ "id"
1711
+ ],
1712
+ "onDelete": "set null",
1713
+ "onUpdate": "no action"
1714
+ }
1715
+ },
1716
+ "compositePrimaryKeys": {},
1717
+ "uniqueConstraints": {},
1718
+ "checkConstraints": {}
1719
+ },
1720
+ "posts": {
1721
+ "name": "posts",
1722
+ "columns": {
1723
+ "id": {
1724
+ "name": "id",
1725
+ "type": "text",
1726
+ "primaryKey": true,
1727
+ "notNull": true,
1728
+ "autoincrement": false
1729
+ },
1730
+ "author_user_id": {
1731
+ "name": "author_user_id",
1732
+ "type": "text",
1733
+ "primaryKey": false,
1734
+ "notNull": false,
1735
+ "autoincrement": false
1736
+ },
1737
+ "member_id": {
1738
+ "name": "member_id",
1739
+ "type": "text",
1740
+ "primaryKey": false,
1741
+ "notNull": false,
1742
+ "autoincrement": false
1743
+ },
1744
+ "organization_id": {
1745
+ "name": "organization_id",
1746
+ "type": "text",
1747
+ "primaryKey": false,
1748
+ "notNull": false,
1749
+ "autoincrement": false
1750
+ },
1751
+ "team_id": {
1752
+ "name": "team_id",
1753
+ "type": "text",
1754
+ "primaryKey": false,
1755
+ "notNull": false,
1756
+ "autoincrement": false
1757
+ },
1758
+ "title": {
1759
+ "name": "title",
1760
+ "type": "text",
1761
+ "primaryKey": false,
1762
+ "notNull": true,
1763
+ "autoincrement": false
1764
+ },
1765
+ "slug": {
1766
+ "name": "slug",
1767
+ "type": "text",
1768
+ "primaryKey": false,
1769
+ "notNull": true,
1770
+ "autoincrement": false
1771
+ },
1772
+ "excerpt": {
1773
+ "name": "excerpt",
1774
+ "type": "text",
1775
+ "primaryKey": false,
1776
+ "notNull": false,
1777
+ "autoincrement": false
1778
+ },
1779
+ "content": {
1780
+ "name": "content",
1781
+ "type": "text",
1782
+ "primaryKey": false,
1783
+ "notNull": true,
1784
+ "autoincrement": false
1785
+ },
1786
+ "status": {
1787
+ "name": "status",
1788
+ "type": "text",
1789
+ "primaryKey": false,
1790
+ "notNull": true,
1791
+ "autoincrement": false,
1792
+ "default": "'draft'"
1793
+ },
1794
+ "published_at": {
1795
+ "name": "published_at",
1796
+ "type": "integer",
1797
+ "primaryKey": false,
1798
+ "notNull": false,
1799
+ "autoincrement": false
1800
+ },
1801
+ "created_at": {
1802
+ "name": "created_at",
1803
+ "type": "integer",
1804
+ "primaryKey": false,
1805
+ "notNull": true,
1806
+ "autoincrement": false
1807
+ },
1808
+ "updated_at": {
1809
+ "name": "updated_at",
1810
+ "type": "integer",
1811
+ "primaryKey": false,
1812
+ "notNull": false,
1813
+ "autoincrement": false
1814
+ },
1815
+ "deleted_at": {
1816
+ "name": "deleted_at",
1817
+ "type": "integer",
1818
+ "primaryKey": false,
1819
+ "notNull": false,
1820
+ "autoincrement": false
1821
+ }
1822
+ },
1823
+ "indexes": {
1824
+ "posts_slug_unique": {
1825
+ "name": "posts_slug_unique",
1826
+ "columns": [
1827
+ "slug"
1828
+ ],
1829
+ "isUnique": true
1830
+ }
1831
+ },
1832
+ "foreignKeys": {
1833
+ "posts_author_user_id_users_id_fk": {
1834
+ "name": "posts_author_user_id_users_id_fk",
1835
+ "tableFrom": "posts",
1836
+ "tableTo": "users",
1837
+ "columnsFrom": [
1838
+ "author_user_id"
1839
+ ],
1840
+ "columnsTo": [
1841
+ "id"
1842
+ ],
1843
+ "onDelete": "set null",
1844
+ "onUpdate": "no action"
1845
+ },
1846
+ "posts_member_id_members_id_fk": {
1847
+ "name": "posts_member_id_members_id_fk",
1848
+ "tableFrom": "posts",
1849
+ "tableTo": "members",
1850
+ "columnsFrom": [
1851
+ "member_id"
1852
+ ],
1853
+ "columnsTo": [
1854
+ "id"
1855
+ ],
1856
+ "onDelete": "set null",
1857
+ "onUpdate": "no action"
1858
+ },
1859
+ "posts_organization_id_organizations_id_fk": {
1860
+ "name": "posts_organization_id_organizations_id_fk",
1861
+ "tableFrom": "posts",
1862
+ "tableTo": "organizations",
1863
+ "columnsFrom": [
1864
+ "organization_id"
1865
+ ],
1866
+ "columnsTo": [
1867
+ "id"
1868
+ ],
1869
+ "onDelete": "set null",
1870
+ "onUpdate": "no action"
1871
+ },
1872
+ "posts_team_id_teams_id_fk": {
1873
+ "name": "posts_team_id_teams_id_fk",
1874
+ "tableFrom": "posts",
1875
+ "tableTo": "teams",
1876
+ "columnsFrom": [
1877
+ "team_id"
1878
+ ],
1879
+ "columnsTo": [
1880
+ "id"
1881
+ ],
1882
+ "onDelete": "set null",
1883
+ "onUpdate": "no action"
1884
+ }
1885
+ },
1886
+ "compositePrimaryKeys": {},
1887
+ "uniqueConstraints": {},
1888
+ "checkConstraints": {}
1889
+ },
1890
+ "sessions": {
1891
+ "name": "sessions",
1892
+ "columns": {
1893
+ "id": {
1894
+ "name": "id",
1895
+ "type": "text",
1896
+ "primaryKey": true,
1897
+ "notNull": true,
1898
+ "autoincrement": false
1899
+ },
1900
+ "expires_at": {
1901
+ "name": "expires_at",
1902
+ "type": "integer",
1903
+ "primaryKey": false,
1904
+ "notNull": true,
1905
+ "autoincrement": false
1906
+ },
1907
+ "token": {
1908
+ "name": "token",
1909
+ "type": "text",
1910
+ "primaryKey": false,
1911
+ "notNull": true,
1912
+ "autoincrement": false
1913
+ },
1914
+ "created_at": {
1915
+ "name": "created_at",
1916
+ "type": "integer",
1917
+ "primaryKey": false,
1918
+ "notNull": true,
1919
+ "autoincrement": false
1920
+ },
1921
+ "updated_at": {
1922
+ "name": "updated_at",
1923
+ "type": "integer",
1924
+ "primaryKey": false,
1925
+ "notNull": true,
1926
+ "autoincrement": false
1927
+ },
1928
+ "ip_address": {
1929
+ "name": "ip_address",
1930
+ "type": "text",
1931
+ "primaryKey": false,
1932
+ "notNull": false,
1933
+ "autoincrement": false
1934
+ },
1935
+ "user_agent": {
1936
+ "name": "user_agent",
1937
+ "type": "text",
1938
+ "primaryKey": false,
1939
+ "notNull": false,
1940
+ "autoincrement": false
1941
+ },
1942
+ "user_id": {
1943
+ "name": "user_id",
1944
+ "type": "text",
1945
+ "primaryKey": false,
1946
+ "notNull": true,
1947
+ "autoincrement": false
1948
+ },
1949
+ "impersonated_by": {
1950
+ "name": "impersonated_by",
1951
+ "type": "text",
1952
+ "primaryKey": false,
1953
+ "notNull": false,
1954
+ "autoincrement": false
1955
+ },
1956
+ "active_organization_id": {
1957
+ "name": "active_organization_id",
1958
+ "type": "text",
1959
+ "primaryKey": false,
1960
+ "notNull": false,
1961
+ "autoincrement": false
1962
+ },
1963
+ "active_organization_member_id": {
1964
+ "name": "active_organization_member_id",
1965
+ "type": "text",
1966
+ "primaryKey": false,
1967
+ "notNull": false,
1968
+ "autoincrement": false
1969
+ },
1970
+ "active_organization_role": {
1971
+ "name": "active_organization_role",
1972
+ "type": "text",
1973
+ "primaryKey": false,
1974
+ "notNull": false,
1975
+ "autoincrement": false
1976
+ },
1977
+ "active_organization_type": {
1978
+ "name": "active_organization_type",
1979
+ "type": "text",
1980
+ "primaryKey": false,
1981
+ "notNull": false,
1982
+ "autoincrement": false
1983
+ },
1984
+ "active_team_id": {
1985
+ "name": "active_team_id",
1986
+ "type": "text",
1987
+ "primaryKey": false,
1988
+ "notNull": false,
1989
+ "autoincrement": false
1990
+ },
1991
+ "active_team_role": {
1992
+ "name": "active_team_role",
1993
+ "type": "text",
1994
+ "primaryKey": false,
1995
+ "notNull": false,
1996
+ "autoincrement": false
1997
+ }
1998
+ },
1999
+ "indexes": {
2000
+ "sessions_token_unique": {
2001
+ "name": "sessions_token_unique",
2002
+ "columns": [
2003
+ "token"
2004
+ ],
2005
+ "isUnique": true
2006
+ }
2007
+ },
2008
+ "foreignKeys": {
2009
+ "sessions_user_id_users_id_fk": {
2010
+ "name": "sessions_user_id_users_id_fk",
2011
+ "tableFrom": "sessions",
2012
+ "tableTo": "users",
2013
+ "columnsFrom": [
2014
+ "user_id"
2015
+ ],
2016
+ "columnsTo": [
2017
+ "id"
2018
+ ],
2019
+ "onDelete": "cascade",
2020
+ "onUpdate": "no action"
2021
+ }
2022
+ },
2023
+ "compositePrimaryKeys": {},
2024
+ "uniqueConstraints": {},
2025
+ "checkConstraints": {}
2026
+ },
2027
+ "teammembers": {
2028
+ "name": "teammembers",
2029
+ "columns": {
2030
+ "id": {
2031
+ "name": "id",
2032
+ "type": "text",
2033
+ "primaryKey": true,
2034
+ "notNull": true,
2035
+ "autoincrement": false
2036
+ },
2037
+ "team_id": {
2038
+ "name": "team_id",
2039
+ "type": "text",
2040
+ "primaryKey": false,
2041
+ "notNull": true,
2042
+ "autoincrement": false
2043
+ },
2044
+ "user_id": {
2045
+ "name": "user_id",
2046
+ "type": "text",
2047
+ "primaryKey": false,
2048
+ "notNull": true,
2049
+ "autoincrement": false
2050
+ },
2051
+ "role": {
2052
+ "name": "role",
2053
+ "type": "text",
2054
+ "primaryKey": false,
2055
+ "notNull": true,
2056
+ "autoincrement": false
2057
+ },
2058
+ "created_at": {
2059
+ "name": "created_at",
2060
+ "type": "integer",
2061
+ "primaryKey": false,
2062
+ "notNull": true,
2063
+ "autoincrement": false
2064
+ }
2065
+ },
2066
+ "indexes": {},
2067
+ "foreignKeys": {
2068
+ "teammembers_team_id_teams_id_fk": {
2069
+ "name": "teammembers_team_id_teams_id_fk",
2070
+ "tableFrom": "teammembers",
2071
+ "tableTo": "teams",
2072
+ "columnsFrom": [
2073
+ "team_id"
2074
+ ],
2075
+ "columnsTo": [
2076
+ "id"
2077
+ ],
2078
+ "onDelete": "no action",
2079
+ "onUpdate": "no action"
2080
+ },
2081
+ "teammembers_user_id_users_id_fk": {
2082
+ "name": "teammembers_user_id_users_id_fk",
2083
+ "tableFrom": "teammembers",
2084
+ "tableTo": "users",
2085
+ "columnsFrom": [
2086
+ "user_id"
2087
+ ],
2088
+ "columnsTo": [
2089
+ "id"
2090
+ ],
2091
+ "onDelete": "no action",
2092
+ "onUpdate": "no action"
2093
+ }
2094
+ },
2095
+ "compositePrimaryKeys": {},
2096
+ "uniqueConstraints": {},
2097
+ "checkConstraints": {}
2098
+ },
2099
+ "teams": {
2100
+ "name": "teams",
2101
+ "columns": {
2102
+ "id": {
2103
+ "name": "id",
2104
+ "type": "text",
2105
+ "primaryKey": true,
2106
+ "notNull": true,
2107
+ "autoincrement": false
2108
+ },
2109
+ "name": {
2110
+ "name": "name",
2111
+ "type": "text",
2112
+ "primaryKey": false,
2113
+ "notNull": true,
2114
+ "autoincrement": false
2115
+ },
2116
+ "organization_id": {
2117
+ "name": "organization_id",
2118
+ "type": "text",
2119
+ "primaryKey": false,
2120
+ "notNull": true,
2121
+ "autoincrement": false
2122
+ },
2123
+ "created_at": {
2124
+ "name": "created_at",
2125
+ "type": "integer",
2126
+ "primaryKey": false,
2127
+ "notNull": true,
2128
+ "autoincrement": false
2129
+ },
2130
+ "updated_at": {
2131
+ "name": "updated_at",
2132
+ "type": "integer",
2133
+ "primaryKey": false,
2134
+ "notNull": false,
2135
+ "autoincrement": false
2136
+ }
2137
+ },
2138
+ "indexes": {},
2139
+ "foreignKeys": {
2140
+ "teams_organization_id_organizations_id_fk": {
2141
+ "name": "teams_organization_id_organizations_id_fk",
2142
+ "tableFrom": "teams",
2143
+ "tableTo": "organizations",
2144
+ "columnsFrom": [
2145
+ "organization_id"
2146
+ ],
2147
+ "columnsTo": [
2148
+ "id"
2149
+ ],
2150
+ "onDelete": "no action",
2151
+ "onUpdate": "no action"
2152
+ }
2153
+ },
2154
+ "compositePrimaryKeys": {},
2155
+ "uniqueConstraints": {},
2156
+ "checkConstraints": {}
2157
+ },
2158
+ "users": {
2159
+ "name": "users",
2160
+ "columns": {
2161
+ "id": {
2162
+ "name": "id",
2163
+ "type": "text",
2164
+ "primaryKey": true,
2165
+ "notNull": true,
2166
+ "autoincrement": false
2167
+ },
2168
+ "name": {
2169
+ "name": "name",
2170
+ "type": "text",
2171
+ "primaryKey": false,
2172
+ "notNull": true,
2173
+ "autoincrement": false
2174
+ },
2175
+ "email": {
2176
+ "name": "email",
2177
+ "type": "text",
2178
+ "primaryKey": false,
2179
+ "notNull": true,
2180
+ "autoincrement": false
2181
+ },
2182
+ "email_verified": {
2183
+ "name": "email_verified",
2184
+ "type": "integer",
2185
+ "primaryKey": false,
2186
+ "notNull": true,
2187
+ "autoincrement": false
2188
+ },
2189
+ "image": {
2190
+ "name": "image",
2191
+ "type": "text",
2192
+ "primaryKey": false,
2193
+ "notNull": false,
2194
+ "autoincrement": false
2195
+ },
2196
+ "created_at": {
2197
+ "name": "created_at",
2198
+ "type": "integer",
2199
+ "primaryKey": false,
2200
+ "notNull": true,
2201
+ "autoincrement": false
2202
+ },
2203
+ "updated_at": {
2204
+ "name": "updated_at",
2205
+ "type": "integer",
2206
+ "primaryKey": false,
2207
+ "notNull": true,
2208
+ "autoincrement": false
2209
+ },
2210
+ "role": {
2211
+ "name": "role",
2212
+ "type": "text",
2213
+ "primaryKey": false,
2214
+ "notNull": false,
2215
+ "autoincrement": false
2216
+ },
2217
+ "banned": {
2218
+ "name": "banned",
2219
+ "type": "integer",
2220
+ "primaryKey": false,
2221
+ "notNull": false,
2222
+ "autoincrement": false
2223
+ },
2224
+ "ban_reason": {
2225
+ "name": "ban_reason",
2226
+ "type": "text",
2227
+ "primaryKey": false,
2228
+ "notNull": false,
2229
+ "autoincrement": false
2230
+ },
2231
+ "ban_expires": {
2232
+ "name": "ban_expires",
2233
+ "type": "integer",
2234
+ "primaryKey": false,
2235
+ "notNull": false,
2236
+ "autoincrement": false
2237
+ },
2238
+ "stripe_customer_id": {
2239
+ "name": "stripe_customer_id",
2240
+ "type": "text",
2241
+ "primaryKey": false,
2242
+ "notNull": false,
2243
+ "autoincrement": false
2244
+ },
2245
+ "payment_customer_id": {
2246
+ "name": "payment_customer_id",
2247
+ "type": "text",
2248
+ "primaryKey": false,
2249
+ "notNull": false,
2250
+ "autoincrement": false
2251
+ },
2252
+ "payment_plan_tier": {
2253
+ "name": "payment_plan_tier",
2254
+ "type": "text",
2255
+ "primaryKey": false,
2256
+ "notNull": false,
2257
+ "autoincrement": false
2258
+ },
2259
+ "payment_plan_expires_at": {
2260
+ "name": "payment_plan_expires_at",
2261
+ "type": "integer",
2262
+ "primaryKey": false,
2263
+ "notNull": false,
2264
+ "autoincrement": false
2265
+ },
2266
+ "preferences": {
2267
+ "name": "preferences",
2268
+ "type": "text",
2269
+ "primaryKey": false,
2270
+ "notNull": false,
2271
+ "autoincrement": false,
2272
+ "default": "'{}'"
2273
+ },
2274
+ "metadata": {
2275
+ "name": "metadata",
2276
+ "type": "text",
2277
+ "primaryKey": false,
2278
+ "notNull": false,
2279
+ "autoincrement": false,
2280
+ "default": "'{}'"
2281
+ },
2282
+ "onboarding": {
2283
+ "name": "onboarding",
2284
+ "type": "integer",
2285
+ "primaryKey": false,
2286
+ "notNull": false,
2287
+ "autoincrement": false
2288
+ },
2289
+ "flags": {
2290
+ "name": "flags",
2291
+ "type": "text",
2292
+ "primaryKey": false,
2293
+ "notNull": false,
2294
+ "autoincrement": false,
2295
+ "default": "'[]'"
2296
+ },
2297
+ "locale": {
2298
+ "name": "locale",
2299
+ "type": "text",
2300
+ "primaryKey": false,
2301
+ "notNull": false,
2302
+ "autoincrement": false
2303
+ }
2304
+ },
2305
+ "indexes": {
2306
+ "users_email_unique": {
2307
+ "name": "users_email_unique",
2308
+ "columns": [
2309
+ "email"
2310
+ ],
2311
+ "isUnique": true
2312
+ },
2313
+ "users_stripe_customer_id_unique": {
2314
+ "name": "users_stripe_customer_id_unique",
2315
+ "columns": [
2316
+ "stripe_customer_id"
2317
+ ],
2318
+ "isUnique": true
2319
+ },
2320
+ "users_payment_customer_id_unique": {
2321
+ "name": "users_payment_customer_id_unique",
2322
+ "columns": [
2323
+ "payment_customer_id"
2324
+ ],
2325
+ "isUnique": true
2326
+ }
2327
+ },
2328
+ "foreignKeys": {},
2329
+ "compositePrimaryKeys": {},
2330
+ "uniqueConstraints": {},
2331
+ "checkConstraints": {}
2332
+ },
2333
+ "verifications": {
2334
+ "name": "verifications",
2335
+ "columns": {
2336
+ "id": {
2337
+ "name": "id",
2338
+ "type": "text",
2339
+ "primaryKey": true,
2340
+ "notNull": true,
2341
+ "autoincrement": false
2342
+ },
2343
+ "identifier": {
2344
+ "name": "identifier",
2345
+ "type": "text",
2346
+ "primaryKey": false,
2347
+ "notNull": true,
2348
+ "autoincrement": false
2349
+ },
2350
+ "value": {
2351
+ "name": "value",
2352
+ "type": "text",
2353
+ "primaryKey": false,
2354
+ "notNull": true,
2355
+ "autoincrement": false
2356
+ },
2357
+ "expires_at": {
2358
+ "name": "expires_at",
2359
+ "type": "integer",
2360
+ "primaryKey": false,
2361
+ "notNull": true,
2362
+ "autoincrement": false
2363
+ },
2364
+ "created_at": {
2365
+ "name": "created_at",
2366
+ "type": "integer",
2367
+ "primaryKey": false,
2368
+ "notNull": false,
2369
+ "autoincrement": false
2370
+ },
2371
+ "updated_at": {
2372
+ "name": "updated_at",
2373
+ "type": "integer",
2374
+ "primaryKey": false,
2375
+ "notNull": false,
2376
+ "autoincrement": false
2377
+ }
2378
+ },
2379
+ "indexes": {},
2380
+ "foreignKeys": {},
2381
+ "compositePrimaryKeys": {},
2382
+ "uniqueConstraints": {},
2383
+ "checkConstraints": {}
2384
+ },
2385
+ "waitlist": {
2386
+ "name": "waitlist",
2387
+ "columns": {
2388
+ "id": {
2389
+ "name": "id",
2390
+ "type": "text",
2391
+ "primaryKey": true,
2392
+ "notNull": true,
2393
+ "autoincrement": false
2394
+ },
2395
+ "name": {
2396
+ "name": "name",
2397
+ "type": "text",
2398
+ "primaryKey": false,
2399
+ "notNull": false,
2400
+ "autoincrement": false
2401
+ },
2402
+ "email": {
2403
+ "name": "email",
2404
+ "type": "text",
2405
+ "primaryKey": false,
2406
+ "notNull": false,
2407
+ "autoincrement": false
2408
+ },
2409
+ "created_at": {
2410
+ "name": "created_at",
2411
+ "type": "integer",
2412
+ "primaryKey": false,
2413
+ "notNull": true,
2414
+ "autoincrement": false
2415
+ },
2416
+ "updated_at": {
2417
+ "name": "updated_at",
2418
+ "type": "integer",
2419
+ "primaryKey": false,
2420
+ "notNull": false,
2421
+ "autoincrement": false
2422
+ },
2423
+ "status": {
2424
+ "name": "status",
2425
+ "type": "text",
2426
+ "primaryKey": false,
2427
+ "notNull": true,
2428
+ "autoincrement": false,
2429
+ "default": "'WAITLIST'"
2430
+ },
2431
+ "type": {
2432
+ "name": "type",
2433
+ "type": "text",
2434
+ "primaryKey": false,
2435
+ "notNull": true,
2436
+ "autoincrement": false,
2437
+ "default": "'WAITLIST'"
2438
+ },
2439
+ "code": {
2440
+ "name": "code",
2441
+ "type": "text",
2442
+ "primaryKey": false,
2443
+ "notNull": false,
2444
+ "autoincrement": false
2445
+ },
2446
+ "expires_at": {
2447
+ "name": "expires_at",
2448
+ "type": "integer",
2449
+ "primaryKey": false,
2450
+ "notNull": false,
2451
+ "autoincrement": false
2452
+ },
2453
+ "user_id": {
2454
+ "name": "user_id",
2455
+ "type": "text",
2456
+ "primaryKey": false,
2457
+ "notNull": false,
2458
+ "autoincrement": false
2459
+ },
2460
+ "claim_user_id": {
2461
+ "name": "claim_user_id",
2462
+ "type": "text",
2463
+ "primaryKey": false,
2464
+ "notNull": false,
2465
+ "autoincrement": false
2466
+ },
2467
+ "claimed_at": {
2468
+ "name": "claimed_at",
2469
+ "type": "integer",
2470
+ "primaryKey": false,
2471
+ "notNull": false,
2472
+ "autoincrement": false
2473
+ },
2474
+ "claimed_email": {
2475
+ "name": "claimed_email",
2476
+ "type": "text",
2477
+ "primaryKey": false,
2478
+ "notNull": false,
2479
+ "autoincrement": false
2480
+ }
2481
+ },
2482
+ "indexes": {},
2483
+ "foreignKeys": {
2484
+ "waitlist_user_id_users_id_fk": {
2485
+ "name": "waitlist_user_id_users_id_fk",
2486
+ "tableFrom": "waitlist",
2487
+ "tableTo": "users",
2488
+ "columnsFrom": [
2489
+ "user_id"
2490
+ ],
2491
+ "columnsTo": [
2492
+ "id"
2493
+ ],
2494
+ "onDelete": "no action",
2495
+ "onUpdate": "no action"
2496
+ },
2497
+ "waitlist_claim_user_id_users_id_fk": {
2498
+ "name": "waitlist_claim_user_id_users_id_fk",
2499
+ "tableFrom": "waitlist",
2500
+ "tableTo": "users",
2501
+ "columnsFrom": [
2502
+ "claim_user_id"
2503
+ ],
2504
+ "columnsTo": [
2505
+ "id"
2506
+ ],
2507
+ "onDelete": "no action",
2508
+ "onUpdate": "no action"
2509
+ }
2510
+ },
2511
+ "compositePrimaryKeys": {},
2512
+ "uniqueConstraints": {},
2513
+ "checkConstraints": {}
2514
+ },
2515
+ "workflows": {
2516
+ "name": "workflows",
2517
+ "columns": {
2518
+ "id": {
2519
+ "name": "id",
2520
+ "type": "text",
2521
+ "primaryKey": true,
2522
+ "notNull": true,
2523
+ "autoincrement": false
2524
+ },
2525
+ "user_id": {
2526
+ "name": "user_id",
2527
+ "type": "text",
2528
+ "primaryKey": false,
2529
+ "notNull": false,
2530
+ "autoincrement": false
2531
+ },
2532
+ "job_id": {
2533
+ "name": "job_id",
2534
+ "type": "text",
2535
+ "primaryKey": false,
2536
+ "notNull": true,
2537
+ "autoincrement": false
2538
+ },
2539
+ "job_name": {
2540
+ "name": "job_name",
2541
+ "type": "text",
2542
+ "primaryKey": false,
2543
+ "notNull": true,
2544
+ "autoincrement": false
2545
+ },
2546
+ "queue_name": {
2547
+ "name": "queue_name",
2548
+ "type": "text",
2549
+ "primaryKey": false,
2550
+ "notNull": true,
2551
+ "autoincrement": false
2552
+ },
2553
+ "timeout": {
2554
+ "name": "timeout",
2555
+ "type": "integer",
2556
+ "primaryKey": false,
2557
+ "notNull": false,
2558
+ "autoincrement": false
2559
+ },
2560
+ "tags": {
2561
+ "name": "tags",
2562
+ "type": "text",
2563
+ "primaryKey": false,
2564
+ "notNull": false,
2565
+ "autoincrement": false
2566
+ },
2567
+ "input": {
2568
+ "name": "input",
2569
+ "type": "text",
2570
+ "primaryKey": false,
2571
+ "notNull": false,
2572
+ "autoincrement": false
2573
+ },
2574
+ "output": {
2575
+ "name": "output",
2576
+ "type": "text",
2577
+ "primaryKey": false,
2578
+ "notNull": false,
2579
+ "autoincrement": false
2580
+ },
2581
+ "status": {
2582
+ "name": "status",
2583
+ "type": "text",
2584
+ "primaryKey": false,
2585
+ "notNull": true,
2586
+ "autoincrement": false
2587
+ },
2588
+ "error": {
2589
+ "name": "error",
2590
+ "type": "text",
2591
+ "primaryKey": false,
2592
+ "notNull": false,
2593
+ "autoincrement": false
2594
+ },
2595
+ "retries": {
2596
+ "name": "retries",
2597
+ "type": "integer",
2598
+ "primaryKey": false,
2599
+ "notNull": true,
2600
+ "autoincrement": false,
2601
+ "default": 0
2602
+ },
2603
+ "finished_at": {
2604
+ "name": "finished_at",
2605
+ "type": "integer",
2606
+ "primaryKey": false,
2607
+ "notNull": false,
2608
+ "autoincrement": false
2609
+ },
2610
+ "processed_at": {
2611
+ "name": "processed_at",
2612
+ "type": "integer",
2613
+ "primaryKey": false,
2614
+ "notNull": false,
2615
+ "autoincrement": false
2616
+ },
2617
+ "created_at": {
2618
+ "name": "created_at",
2619
+ "type": "integer",
2620
+ "primaryKey": false,
2621
+ "notNull": true,
2622
+ "autoincrement": false
2623
+ },
2624
+ "updated_at": {
2625
+ "name": "updated_at",
2626
+ "type": "integer",
2627
+ "primaryKey": false,
2628
+ "notNull": true,
2629
+ "autoincrement": false
2630
+ }
2631
+ },
2632
+ "indexes": {
2633
+ "workflows_job_id_unique": {
2634
+ "name": "workflows_job_id_unique",
2635
+ "columns": [
2636
+ "job_id"
2637
+ ],
2638
+ "isUnique": true
2639
+ }
2640
+ },
2641
+ "foreignKeys": {
2642
+ "workflows_user_id_users_id_fk": {
2643
+ "name": "workflows_user_id_users_id_fk",
2644
+ "tableFrom": "workflows",
2645
+ "tableTo": "users",
2646
+ "columnsFrom": [
2647
+ "user_id"
2648
+ ],
2649
+ "columnsTo": [
2650
+ "id"
2651
+ ],
2652
+ "onDelete": "cascade",
2653
+ "onUpdate": "no action"
2654
+ }
2655
+ },
2656
+ "compositePrimaryKeys": {},
2657
+ "uniqueConstraints": {},
2658
+ "checkConstraints": {}
2659
+ }
2660
+ },
2661
+ "views": {},
2662
+ "enums": {},
2663
+ "_meta": {
2664
+ "schemas": {},
2665
+ "tables": {},
2666
+ "columns": {}
2667
+ },
2668
+ "internal": {
2669
+ "indexes": {}
2670
+ }
2671
+ }