create-m5kdev 0.35.0 → 0.37.2

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