create-m5kdev 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/package.json +1 -1
  2. package/templates/minimal-app/.cursor/rules/frontend-component-guide.mdc +95 -95
  3. package/templates/minimal-app/.cursor/rules/frontend-data-guide.mdc +103 -103
  4. package/templates/minimal-app/.cursor/rules/frontend-form-guide.mdc +80 -80
  5. package/templates/minimal-app/.cursor/rules/frontend-hook-guide.mdc +79 -79
  6. package/templates/minimal-app/.cursor/rules/frontend-i18n-guide.mdc +45 -45
  7. package/templates/minimal-app/.cursor/rules/module-dto-guide.mdc +60 -60
  8. package/templates/minimal-app/.cursor/rules/module-prompt-guide.mdc +214 -214
  9. package/templates/minimal-app/.cursor/rules/module-repository-guide.mdc +167 -167
  10. package/templates/minimal-app/.cursor/rules/module-schema-guide.mdc +53 -53
  11. package/templates/minimal-app/.cursor/rules/module-service-guide.mdc +367 -367
  12. package/templates/minimal-app/.cursor/rules/module-trpc-guide.mdc +71 -71
  13. package/templates/minimal-app/.github/workflows/check.yml.tpl +21 -0
  14. package/templates/minimal-app/AGENTS.md.tpl +22 -31
  15. package/templates/minimal-app/CLAUDE.md.tpl +17 -3
  16. package/templates/minimal-app/GLOSSARY.md.tpl +181 -0
  17. package/templates/minimal-app/README.md.tpl +14 -6
  18. package/templates/minimal-app/apps/.gitignore.tpl +13 -13
  19. package/templates/minimal-app/apps/e2e/package.json.tpl +23 -23
  20. package/templates/minimal-app/apps/e2e/servers.ts.tpl +22 -6
  21. package/templates/minimal-app/apps/email/package.json.tpl +34 -34
  22. package/templates/minimal-app/apps/expo/.gitignore.tpl +44 -44
  23. package/templates/minimal-app/apps/expo/.prettierignore +13 -13
  24. package/templates/minimal-app/apps/expo/.prettierrc.json.tpl +9 -9
  25. package/templates/minimal-app/apps/expo/CHANGELOG.md.tpl +156 -156
  26. package/templates/minimal-app/apps/expo/README.md.tpl +44 -44
  27. package/templates/minimal-app/apps/expo/expo-env.d.ts.tpl +3 -0
  28. package/templates/minimal-app/apps/expo/package.json.tpl +63 -63
  29. package/templates/minimal-app/apps/expo/uniwind-types.d.ts.tpl +10 -0
  30. package/templates/minimal-app/apps/landing/package.json.tpl +34 -34
  31. package/templates/minimal-app/apps/server/AGENTS.md.tpl +1 -1
  32. package/templates/minimal-app/apps/server/drizzle/0000_whole_echo.sql +366 -366
  33. package/templates/minimal-app/apps/server/drizzle/0002_crazy_lilith.sql +46 -46
  34. package/templates/minimal-app/apps/server/drizzle/0003_freezing_fantastic_four.sql +3 -3
  35. package/templates/minimal-app/apps/server/drizzle/0004_slow_ezekiel_stane.sql +98 -98
  36. package/templates/minimal-app/apps/server/drizzle/0005_wonderful_the_professor.sql +1 -1
  37. package/templates/minimal-app/apps/server/drizzle/0006_lazy_blue_marvel.sql +158 -158
  38. package/templates/minimal-app/apps/server/drizzle/0007_abnormal_ultimo.sql +1 -1
  39. package/templates/minimal-app/apps/server/drizzle/0008_steady_nekra.sql +86 -86
  40. package/templates/minimal-app/apps/server/drizzle/meta/0000_snapshot.json.tpl +2624 -2624
  41. package/templates/minimal-app/apps/server/drizzle/meta/0001_snapshot.json.tpl +2670 -2670
  42. package/templates/minimal-app/apps/server/drizzle/meta/0002_snapshot.json.tpl +2715 -2715
  43. package/templates/minimal-app/apps/server/drizzle/meta/0003_snapshot.json.tpl +2687 -2687
  44. package/templates/minimal-app/apps/server/drizzle/meta/0004_snapshot.json.tpl +2497 -2497
  45. package/templates/minimal-app/apps/server/drizzle/meta/0005_snapshot.json.tpl +2483 -2483
  46. package/templates/minimal-app/apps/server/drizzle/meta/0006_snapshot.json.tpl +3602 -3602
  47. package/templates/minimal-app/apps/server/drizzle/meta/0007_snapshot.json.tpl +3619 -3619
  48. package/templates/minimal-app/apps/server/drizzle/meta/0008_snapshot.json.tpl +3619 -3619
  49. package/templates/minimal-app/apps/server/drizzle/meta/_journal.json.tpl +76 -76
  50. package/templates/minimal-app/apps/server/drizzle-postgresql/0000_glorious_warhawk.sql +522 -0
  51. package/templates/minimal-app/apps/server/drizzle-postgresql/meta/0000_snapshot.json.tpl +3555 -0
  52. package/templates/minimal-app/apps/server/drizzle-postgresql/meta/_journal.json.tpl +13 -0
  53. package/templates/minimal-app/apps/server/drizzle.config.ts.tpl +1 -1
  54. package/templates/minimal-app/apps/server/mastra.ts.tpl +42 -0
  55. package/templates/minimal-app/apps/server/package.json.tpl +9 -4
  56. package/templates/minimal-app/apps/server/src/app.ts.tpl +21 -16
  57. package/templates/minimal-app/apps/server/src/drizzle.schema.ts.tpl +2 -0
  58. package/templates/minimal-app/apps/server/src/modules/conversation/conversation.mastra.ts.tpl +48 -0
  59. package/templates/minimal-app/apps/server/src/modules/conversation/conversation.persistence.ts.tpl +47 -0
  60. package/templates/minimal-app/apps/server/src/modules/posts/posts.db.ts.tpl +7 -6
  61. package/templates/minimal-app/apps/server/src/modules/posts/posts.repository.ts.tpl +2 -2
  62. package/templates/minimal-app/apps/shared/.env.example.tpl +6 -3
  63. package/templates/minimal-app/apps/shared/.env.production.example.tpl +7 -2
  64. package/templates/minimal-app/apps/shared/.env.tpl +6 -3
  65. package/templates/minimal-app/apps/shared/Dockerfile.pgbouncer +6 -0
  66. package/templates/minimal-app/apps/shared/compose.yaml.tpl +27 -0
  67. package/templates/minimal-app/apps/shared/fly.toml.tpl +0 -4
  68. package/templates/minimal-app/apps/shared/package.json.tpl +27 -27
  69. package/templates/minimal-app/apps/shared/pgbouncer.ini +13 -0
  70. package/templates/minimal-app/apps/shared/pgbouncer.users +1 -0
  71. package/templates/minimal-app/apps/webapp/AGENTS.md.tpl +24 -24
  72. package/templates/minimal-app/apps/webapp/index.html.tpl +22 -22
  73. package/templates/minimal-app/apps/webapp/package.json.tpl +53 -53
  74. package/templates/minimal-app/apps/webapp/public/logo.svg.tpl +6 -6
  75. package/templates/minimal-app/apps/webapp/translations/en/{{APP_SLUG}}.json.tpl +1 -1
  76. package/templates/minimal-app/biome.json.tpl +1 -0
  77. package/templates/minimal-app/docs/adr/.gitkeep +0 -0
  78. package/templates/minimal-app/docs/agents/domain.md.tpl +38 -0
  79. package/templates/minimal-app/docs/agents/issue-tracker.md.tpl +45 -0
  80. package/templates/minimal-app/docs/agents/triage-labels.md.tpl +15 -0
  81. package/templates/minimal-app/package.json.tpl +5 -0
  82. package/templates/minimal-app/pnpm-workspace.yaml.tpl +16 -13
  83. package/templates/minimal-app/template.manifest.json +21 -0
@@ -0,0 +1,3555 @@
1
+ {
2
+ "id": "3b56889c-7a5f-4646-8da0-270f63ab0318",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "app.account_claim_magic_links": {
8
+ "name": "account_claim_magic_links",
9
+ "schema": "app",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "claim_id": {
18
+ "name": "claim_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "user_id": {
24
+ "name": "user_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "email": {
30
+ "name": "email",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "token": {
36
+ "name": "token",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "url": {
42
+ "name": "url",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "expires_at": {
48
+ "name": "expires_at",
49
+ "type": "timestamp with time zone",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "created_at": {
54
+ "name": "created_at",
55
+ "type": "timestamp with time zone",
56
+ "primaryKey": false,
57
+ "notNull": true
58
+ }
59
+ },
60
+ "indexes": {},
61
+ "foreignKeys": {
62
+ "account_claim_magic_links_claim_id_account_claims_id_fk": {
63
+ "name": "account_claim_magic_links_claim_id_account_claims_id_fk",
64
+ "tableFrom": "account_claim_magic_links",
65
+ "tableTo": "account_claims",
66
+ "schemaTo": "app",
67
+ "columnsFrom": [
68
+ "claim_id"
69
+ ],
70
+ "columnsTo": [
71
+ "id"
72
+ ],
73
+ "onDelete": "cascade",
74
+ "onUpdate": "no action"
75
+ },
76
+ "account_claim_magic_links_user_id_users_id_fk": {
77
+ "name": "account_claim_magic_links_user_id_users_id_fk",
78
+ "tableFrom": "account_claim_magic_links",
79
+ "tableTo": "users",
80
+ "schemaTo": "app",
81
+ "columnsFrom": [
82
+ "user_id"
83
+ ],
84
+ "columnsTo": [
85
+ "id"
86
+ ],
87
+ "onDelete": "cascade",
88
+ "onUpdate": "no action"
89
+ }
90
+ },
91
+ "compositePrimaryKeys": {},
92
+ "uniqueConstraints": {},
93
+ "policies": {},
94
+ "checkConstraints": {},
95
+ "isRLSEnabled": false
96
+ },
97
+ "app.account_claims": {
98
+ "name": "account_claims",
99
+ "schema": "app",
100
+ "columns": {
101
+ "id": {
102
+ "name": "id",
103
+ "type": "text",
104
+ "primaryKey": true,
105
+ "notNull": true
106
+ },
107
+ "claim_user_id": {
108
+ "name": "claim_user_id",
109
+ "type": "text",
110
+ "primaryKey": false,
111
+ "notNull": true
112
+ },
113
+ "status": {
114
+ "name": "status",
115
+ "type": "text",
116
+ "primaryKey": false,
117
+ "notNull": true
118
+ },
119
+ "code": {
120
+ "name": "code",
121
+ "type": "text",
122
+ "primaryKey": false,
123
+ "notNull": false
124
+ },
125
+ "expires_at": {
126
+ "name": "expires_at",
127
+ "type": "timestamp with time zone",
128
+ "primaryKey": false,
129
+ "notNull": false
130
+ },
131
+ "claimed_at": {
132
+ "name": "claimed_at",
133
+ "type": "timestamp with time zone",
134
+ "primaryKey": false,
135
+ "notNull": false
136
+ },
137
+ "claimed_email": {
138
+ "name": "claimed_email",
139
+ "type": "text",
140
+ "primaryKey": false,
141
+ "notNull": false
142
+ },
143
+ "created_at": {
144
+ "name": "created_at",
145
+ "type": "timestamp with time zone",
146
+ "primaryKey": false,
147
+ "notNull": true
148
+ },
149
+ "updated_at": {
150
+ "name": "updated_at",
151
+ "type": "timestamp with time zone",
152
+ "primaryKey": false,
153
+ "notNull": false
154
+ }
155
+ },
156
+ "indexes": {},
157
+ "foreignKeys": {
158
+ "account_claims_claim_user_id_users_id_fk": {
159
+ "name": "account_claims_claim_user_id_users_id_fk",
160
+ "tableFrom": "account_claims",
161
+ "tableTo": "users",
162
+ "schemaTo": "app",
163
+ "columnsFrom": [
164
+ "claim_user_id"
165
+ ],
166
+ "columnsTo": [
167
+ "id"
168
+ ],
169
+ "onDelete": "no action",
170
+ "onUpdate": "no action"
171
+ }
172
+ },
173
+ "compositePrimaryKeys": {},
174
+ "uniqueConstraints": {},
175
+ "policies": {},
176
+ "checkConstraints": {},
177
+ "isRLSEnabled": false
178
+ },
179
+ "app.accounts": {
180
+ "name": "accounts",
181
+ "schema": "app",
182
+ "columns": {
183
+ "id": {
184
+ "name": "id",
185
+ "type": "text",
186
+ "primaryKey": true,
187
+ "notNull": true
188
+ },
189
+ "account_id": {
190
+ "name": "account_id",
191
+ "type": "text",
192
+ "primaryKey": false,
193
+ "notNull": true
194
+ },
195
+ "issuer": {
196
+ "name": "issuer",
197
+ "type": "text",
198
+ "primaryKey": false,
199
+ "notNull": true,
200
+ "default": "'local:credential'"
201
+ },
202
+ "provider_id": {
203
+ "name": "provider_id",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": true
207
+ },
208
+ "user_id": {
209
+ "name": "user_id",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": true
213
+ },
214
+ "access_token": {
215
+ "name": "access_token",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": false
219
+ },
220
+ "refresh_token": {
221
+ "name": "refresh_token",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": false
225
+ },
226
+ "id_token": {
227
+ "name": "id_token",
228
+ "type": "text",
229
+ "primaryKey": false,
230
+ "notNull": false
231
+ },
232
+ "access_token_expires_at": {
233
+ "name": "access_token_expires_at",
234
+ "type": "timestamp with time zone",
235
+ "primaryKey": false,
236
+ "notNull": false
237
+ },
238
+ "refresh_token_expires_at": {
239
+ "name": "refresh_token_expires_at",
240
+ "type": "timestamp with time zone",
241
+ "primaryKey": false,
242
+ "notNull": false
243
+ },
244
+ "scope": {
245
+ "name": "scope",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": false
249
+ },
250
+ "password": {
251
+ "name": "password",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": false
255
+ },
256
+ "created_at": {
257
+ "name": "created_at",
258
+ "type": "timestamp with time zone",
259
+ "primaryKey": false,
260
+ "notNull": true
261
+ },
262
+ "updated_at": {
263
+ "name": "updated_at",
264
+ "type": "timestamp with time zone",
265
+ "primaryKey": false,
266
+ "notNull": true
267
+ }
268
+ },
269
+ "indexes": {
270
+ "accounts_issuer_account_id_unique": {
271
+ "name": "accounts_issuer_account_id_unique",
272
+ "columns": [
273
+ {
274
+ "expression": "issuer",
275
+ "isExpression": false,
276
+ "asc": true,
277
+ "nulls": "last"
278
+ },
279
+ {
280
+ "expression": "account_id",
281
+ "isExpression": false,
282
+ "asc": true,
283
+ "nulls": "last"
284
+ }
285
+ ],
286
+ "isUnique": true,
287
+ "concurrently": false,
288
+ "method": "btree",
289
+ "with": {}
290
+ }
291
+ },
292
+ "foreignKeys": {
293
+ "accounts_user_id_users_id_fk": {
294
+ "name": "accounts_user_id_users_id_fk",
295
+ "tableFrom": "accounts",
296
+ "tableTo": "users",
297
+ "schemaTo": "app",
298
+ "columnsFrom": [
299
+ "user_id"
300
+ ],
301
+ "columnsTo": [
302
+ "id"
303
+ ],
304
+ "onDelete": "cascade",
305
+ "onUpdate": "no action"
306
+ }
307
+ },
308
+ "compositePrimaryKeys": {},
309
+ "uniqueConstraints": {},
310
+ "policies": {},
311
+ "checkConstraints": {},
312
+ "isRLSEnabled": false
313
+ },
314
+ "app.ai_usage": {
315
+ "name": "ai_usage",
316
+ "schema": "app",
317
+ "columns": {
318
+ "id": {
319
+ "name": "id",
320
+ "type": "text",
321
+ "primaryKey": true,
322
+ "notNull": true
323
+ },
324
+ "user_id": {
325
+ "name": "user_id",
326
+ "type": "text",
327
+ "primaryKey": false,
328
+ "notNull": false
329
+ },
330
+ "member_id": {
331
+ "name": "member_id",
332
+ "type": "text",
333
+ "primaryKey": false,
334
+ "notNull": false
335
+ },
336
+ "team_id": {
337
+ "name": "team_id",
338
+ "type": "text",
339
+ "primaryKey": false,
340
+ "notNull": false
341
+ },
342
+ "organization_id": {
343
+ "name": "organization_id",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": false
347
+ },
348
+ "feature": {
349
+ "name": "feature",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": true
353
+ },
354
+ "provider": {
355
+ "name": "provider",
356
+ "type": "text",
357
+ "primaryKey": false,
358
+ "notNull": true
359
+ },
360
+ "model": {
361
+ "name": "model",
362
+ "type": "text",
363
+ "primaryKey": false,
364
+ "notNull": true
365
+ },
366
+ "input_tokens": {
367
+ "name": "input_tokens",
368
+ "type": "integer",
369
+ "primaryKey": false,
370
+ "notNull": false
371
+ },
372
+ "output_tokens": {
373
+ "name": "output_tokens",
374
+ "type": "integer",
375
+ "primaryKey": false,
376
+ "notNull": false
377
+ },
378
+ "total_tokens": {
379
+ "name": "total_tokens",
380
+ "type": "integer",
381
+ "primaryKey": false,
382
+ "notNull": false
383
+ },
384
+ "cost": {
385
+ "name": "cost",
386
+ "type": "double precision",
387
+ "primaryKey": false,
388
+ "notNull": false
389
+ },
390
+ "trace_id": {
391
+ "name": "trace_id",
392
+ "type": "text",
393
+ "primaryKey": false,
394
+ "notNull": false
395
+ },
396
+ "created_at": {
397
+ "name": "created_at",
398
+ "type": "timestamp with time zone",
399
+ "primaryKey": false,
400
+ "notNull": true
401
+ },
402
+ "metadata": {
403
+ "name": "metadata",
404
+ "type": "jsonb",
405
+ "primaryKey": false,
406
+ "notNull": false
407
+ }
408
+ },
409
+ "indexes": {},
410
+ "foreignKeys": {
411
+ "ai_usage_user_id_users_id_fk": {
412
+ "name": "ai_usage_user_id_users_id_fk",
413
+ "tableFrom": "ai_usage",
414
+ "tableTo": "users",
415
+ "schemaTo": "app",
416
+ "columnsFrom": [
417
+ "user_id"
418
+ ],
419
+ "columnsTo": [
420
+ "id"
421
+ ],
422
+ "onDelete": "set null",
423
+ "onUpdate": "no action"
424
+ },
425
+ "ai_usage_member_id_members_id_fk": {
426
+ "name": "ai_usage_member_id_members_id_fk",
427
+ "tableFrom": "ai_usage",
428
+ "tableTo": "members",
429
+ "schemaTo": "app",
430
+ "columnsFrom": [
431
+ "member_id"
432
+ ],
433
+ "columnsTo": [
434
+ "id"
435
+ ],
436
+ "onDelete": "set null",
437
+ "onUpdate": "no action"
438
+ },
439
+ "ai_usage_organization_id_organizations_id_fk": {
440
+ "name": "ai_usage_organization_id_organizations_id_fk",
441
+ "tableFrom": "ai_usage",
442
+ "tableTo": "organizations",
443
+ "schemaTo": "app",
444
+ "columnsFrom": [
445
+ "organization_id"
446
+ ],
447
+ "columnsTo": [
448
+ "id"
449
+ ],
450
+ "onDelete": "set null",
451
+ "onUpdate": "no action"
452
+ }
453
+ },
454
+ "compositePrimaryKeys": {},
455
+ "uniqueConstraints": {},
456
+ "policies": {},
457
+ "checkConstraints": {},
458
+ "isRLSEnabled": false
459
+ },
460
+ "app.apikeys": {
461
+ "name": "apikeys",
462
+ "schema": "app",
463
+ "columns": {
464
+ "id": {
465
+ "name": "id",
466
+ "type": "text",
467
+ "primaryKey": true,
468
+ "notNull": true
469
+ },
470
+ "name": {
471
+ "name": "name",
472
+ "type": "text",
473
+ "primaryKey": false,
474
+ "notNull": false
475
+ },
476
+ "start": {
477
+ "name": "start",
478
+ "type": "text",
479
+ "primaryKey": false,
480
+ "notNull": false
481
+ },
482
+ "prefix": {
483
+ "name": "prefix",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": false
487
+ },
488
+ "key": {
489
+ "name": "key",
490
+ "type": "text",
491
+ "primaryKey": false,
492
+ "notNull": true
493
+ },
494
+ "config_id": {
495
+ "name": "config_id",
496
+ "type": "text",
497
+ "primaryKey": false,
498
+ "notNull": true,
499
+ "default": "'default'"
500
+ },
501
+ "reference_id": {
502
+ "name": "reference_id",
503
+ "type": "text",
504
+ "primaryKey": false,
505
+ "notNull": true
506
+ },
507
+ "user_id": {
508
+ "name": "user_id",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": false
512
+ },
513
+ "refill_interval": {
514
+ "name": "refill_interval",
515
+ "type": "integer",
516
+ "primaryKey": false,
517
+ "notNull": false
518
+ },
519
+ "refill_amount": {
520
+ "name": "refill_amount",
521
+ "type": "integer",
522
+ "primaryKey": false,
523
+ "notNull": false
524
+ },
525
+ "last_refill_at": {
526
+ "name": "last_refill_at",
527
+ "type": "timestamp with time zone",
528
+ "primaryKey": false,
529
+ "notNull": false
530
+ },
531
+ "enabled": {
532
+ "name": "enabled",
533
+ "type": "boolean",
534
+ "primaryKey": false,
535
+ "notNull": true
536
+ },
537
+ "rate_limit_enabled": {
538
+ "name": "rate_limit_enabled",
539
+ "type": "boolean",
540
+ "primaryKey": false,
541
+ "notNull": true
542
+ },
543
+ "rate_limit_time_window": {
544
+ "name": "rate_limit_time_window",
545
+ "type": "integer",
546
+ "primaryKey": false,
547
+ "notNull": false
548
+ },
549
+ "rate_limit_max": {
550
+ "name": "rate_limit_max",
551
+ "type": "integer",
552
+ "primaryKey": false,
553
+ "notNull": false
554
+ },
555
+ "request_count": {
556
+ "name": "request_count",
557
+ "type": "integer",
558
+ "primaryKey": false,
559
+ "notNull": true
560
+ },
561
+ "remaining": {
562
+ "name": "remaining",
563
+ "type": "integer",
564
+ "primaryKey": false,
565
+ "notNull": false
566
+ },
567
+ "last_request": {
568
+ "name": "last_request",
569
+ "type": "timestamp with time zone",
570
+ "primaryKey": false,
571
+ "notNull": false
572
+ },
573
+ "expires_at": {
574
+ "name": "expires_at",
575
+ "type": "timestamp with time zone",
576
+ "primaryKey": false,
577
+ "notNull": false
578
+ },
579
+ "created_at": {
580
+ "name": "created_at",
581
+ "type": "timestamp with time zone",
582
+ "primaryKey": false,
583
+ "notNull": true
584
+ },
585
+ "updated_at": {
586
+ "name": "updated_at",
587
+ "type": "timestamp with time zone",
588
+ "primaryKey": false,
589
+ "notNull": true
590
+ },
591
+ "permissions": {
592
+ "name": "permissions",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": false
596
+ },
597
+ "metadata": {
598
+ "name": "metadata",
599
+ "type": "text",
600
+ "primaryKey": false,
601
+ "notNull": false
602
+ }
603
+ },
604
+ "indexes": {},
605
+ "foreignKeys": {
606
+ "apikeys_user_id_users_id_fk": {
607
+ "name": "apikeys_user_id_users_id_fk",
608
+ "tableFrom": "apikeys",
609
+ "tableTo": "users",
610
+ "schemaTo": "app",
611
+ "columnsFrom": [
612
+ "user_id"
613
+ ],
614
+ "columnsTo": [
615
+ "id"
616
+ ],
617
+ "onDelete": "no action",
618
+ "onUpdate": "no action"
619
+ }
620
+ },
621
+ "compositePrimaryKeys": {},
622
+ "uniqueConstraints": {},
623
+ "policies": {},
624
+ "checkConstraints": {},
625
+ "isRLSEnabled": false
626
+ },
627
+ "app.chats": {
628
+ "name": "chats",
629
+ "schema": "app",
630
+ "columns": {
631
+ "id": {
632
+ "name": "id",
633
+ "type": "text",
634
+ "primaryKey": true,
635
+ "notNull": true
636
+ },
637
+ "user_id": {
638
+ "name": "user_id",
639
+ "type": "text",
640
+ "primaryKey": false,
641
+ "notNull": true
642
+ },
643
+ "title": {
644
+ "name": "title",
645
+ "type": "text",
646
+ "primaryKey": false,
647
+ "notNull": false
648
+ },
649
+ "type": {
650
+ "name": "type",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": false
654
+ },
655
+ "conversation": {
656
+ "name": "conversation",
657
+ "type": "jsonb",
658
+ "primaryKey": false,
659
+ "notNull": false
660
+ },
661
+ "created_at": {
662
+ "name": "created_at",
663
+ "type": "timestamp with time zone",
664
+ "primaryKey": false,
665
+ "notNull": false
666
+ },
667
+ "updated_at": {
668
+ "name": "updated_at",
669
+ "type": "timestamp with time zone",
670
+ "primaryKey": false,
671
+ "notNull": true
672
+ }
673
+ },
674
+ "indexes": {},
675
+ "foreignKeys": {
676
+ "chats_user_id_users_id_fk": {
677
+ "name": "chats_user_id_users_id_fk",
678
+ "tableFrom": "chats",
679
+ "tableTo": "users",
680
+ "schemaTo": "app",
681
+ "columnsFrom": [
682
+ "user_id"
683
+ ],
684
+ "columnsTo": [
685
+ "id"
686
+ ],
687
+ "onDelete": "cascade",
688
+ "onUpdate": "no action"
689
+ }
690
+ },
691
+ "compositePrimaryKeys": {},
692
+ "uniqueConstraints": {},
693
+ "policies": {},
694
+ "checkConstraints": {},
695
+ "isRLSEnabled": false
696
+ },
697
+ "app.files": {
698
+ "name": "files",
699
+ "schema": "app",
700
+ "columns": {
701
+ "id": {
702
+ "name": "id",
703
+ "type": "text",
704
+ "primaryKey": true,
705
+ "notNull": true
706
+ },
707
+ "created_at": {
708
+ "name": "created_at",
709
+ "type": "timestamp with time zone",
710
+ "primaryKey": false,
711
+ "notNull": true
712
+ },
713
+ "updated_at": {
714
+ "name": "updated_at",
715
+ "type": "timestamp with time zone",
716
+ "primaryKey": false,
717
+ "notNull": false
718
+ },
719
+ "deleted_at": {
720
+ "name": "deleted_at",
721
+ "type": "timestamp with time zone",
722
+ "primaryKey": false,
723
+ "notNull": false
724
+ },
725
+ "user_id": {
726
+ "name": "user_id",
727
+ "type": "text",
728
+ "primaryKey": false,
729
+ "notNull": false
730
+ },
731
+ "member_id": {
732
+ "name": "member_id",
733
+ "type": "text",
734
+ "primaryKey": false,
735
+ "notNull": false
736
+ },
737
+ "organization_id": {
738
+ "name": "organization_id",
739
+ "type": "text",
740
+ "primaryKey": false,
741
+ "notNull": false
742
+ },
743
+ "bucket": {
744
+ "name": "bucket",
745
+ "type": "text",
746
+ "primaryKey": false,
747
+ "notNull": true
748
+ },
749
+ "key": {
750
+ "name": "key",
751
+ "type": "text",
752
+ "primaryKey": false,
753
+ "notNull": true
754
+ },
755
+ "original_name": {
756
+ "name": "original_name",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": true
760
+ },
761
+ "original_extension": {
762
+ "name": "original_extension",
763
+ "type": "text",
764
+ "primaryKey": false,
765
+ "notNull": false
766
+ },
767
+ "content_type": {
768
+ "name": "content_type",
769
+ "type": "text",
770
+ "primaryKey": false,
771
+ "notNull": true
772
+ },
773
+ "size_bytes": {
774
+ "name": "size_bytes",
775
+ "type": "bigint",
776
+ "primaryKey": false,
777
+ "notNull": false
778
+ },
779
+ "etag": {
780
+ "name": "etag",
781
+ "type": "text",
782
+ "primaryKey": false,
783
+ "notNull": false
784
+ },
785
+ "checksum_sha256": {
786
+ "name": "checksum_sha256",
787
+ "type": "text",
788
+ "primaryKey": false,
789
+ "notNull": false
790
+ },
791
+ "metadata": {
792
+ "name": "metadata",
793
+ "type": "jsonb",
794
+ "primaryKey": false,
795
+ "notNull": false
796
+ },
797
+ "status": {
798
+ "name": "status",
799
+ "type": "text",
800
+ "primaryKey": false,
801
+ "notNull": true
802
+ },
803
+ "uploaded_at": {
804
+ "name": "uploaded_at",
805
+ "type": "timestamp with time zone",
806
+ "primaryKey": false,
807
+ "notNull": false
808
+ }
809
+ },
810
+ "indexes": {
811
+ "files_bucket_key_unique": {
812
+ "name": "files_bucket_key_unique",
813
+ "columns": [
814
+ {
815
+ "expression": "bucket",
816
+ "isExpression": false,
817
+ "asc": true,
818
+ "nulls": "last"
819
+ },
820
+ {
821
+ "expression": "key",
822
+ "isExpression": false,
823
+ "asc": true,
824
+ "nulls": "last"
825
+ }
826
+ ],
827
+ "isUnique": true,
828
+ "concurrently": false,
829
+ "method": "btree",
830
+ "with": {}
831
+ }
832
+ },
833
+ "foreignKeys": {
834
+ "files_user_id_users_id_fk": {
835
+ "name": "files_user_id_users_id_fk",
836
+ "tableFrom": "files",
837
+ "tableTo": "users",
838
+ "schemaTo": "app",
839
+ "columnsFrom": [
840
+ "user_id"
841
+ ],
842
+ "columnsTo": [
843
+ "id"
844
+ ],
845
+ "onDelete": "set null",
846
+ "onUpdate": "no action"
847
+ },
848
+ "files_member_id_members_id_fk": {
849
+ "name": "files_member_id_members_id_fk",
850
+ "tableFrom": "files",
851
+ "tableTo": "members",
852
+ "schemaTo": "app",
853
+ "columnsFrom": [
854
+ "member_id"
855
+ ],
856
+ "columnsTo": [
857
+ "id"
858
+ ],
859
+ "onDelete": "set null",
860
+ "onUpdate": "no action"
861
+ },
862
+ "files_organization_id_organizations_id_fk": {
863
+ "name": "files_organization_id_organizations_id_fk",
864
+ "tableFrom": "files",
865
+ "tableTo": "organizations",
866
+ "schemaTo": "app",
867
+ "columnsFrom": [
868
+ "organization_id"
869
+ ],
870
+ "columnsTo": [
871
+ "id"
872
+ ],
873
+ "onDelete": "set null",
874
+ "onUpdate": "no action"
875
+ }
876
+ },
877
+ "compositePrimaryKeys": {},
878
+ "uniqueConstraints": {},
879
+ "policies": {},
880
+ "checkConstraints": {},
881
+ "isRLSEnabled": false
882
+ },
883
+ "app.invitations": {
884
+ "name": "invitations",
885
+ "schema": "app",
886
+ "columns": {
887
+ "id": {
888
+ "name": "id",
889
+ "type": "text",
890
+ "primaryKey": true,
891
+ "notNull": true
892
+ },
893
+ "organization_id": {
894
+ "name": "organization_id",
895
+ "type": "text",
896
+ "primaryKey": false,
897
+ "notNull": true
898
+ },
899
+ "member_id": {
900
+ "name": "member_id",
901
+ "type": "text",
902
+ "primaryKey": false,
903
+ "notNull": false
904
+ },
905
+ "email": {
906
+ "name": "email",
907
+ "type": "text",
908
+ "primaryKey": false,
909
+ "notNull": true
910
+ },
911
+ "role": {
912
+ "name": "role",
913
+ "type": "text",
914
+ "primaryKey": false,
915
+ "notNull": false
916
+ },
917
+ "status": {
918
+ "name": "status",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": true
922
+ },
923
+ "created_at": {
924
+ "name": "created_at",
925
+ "type": "timestamp with time zone",
926
+ "primaryKey": false,
927
+ "notNull": true
928
+ },
929
+ "expires_at": {
930
+ "name": "expires_at",
931
+ "type": "timestamp with time zone",
932
+ "primaryKey": false,
933
+ "notNull": true
934
+ },
935
+ "inviter_id": {
936
+ "name": "inviter_id",
937
+ "type": "text",
938
+ "primaryKey": false,
939
+ "notNull": true
940
+ }
941
+ },
942
+ "indexes": {},
943
+ "foreignKeys": {
944
+ "invitations_organization_id_organizations_id_fk": {
945
+ "name": "invitations_organization_id_organizations_id_fk",
946
+ "tableFrom": "invitations",
947
+ "tableTo": "organizations",
948
+ "schemaTo": "app",
949
+ "columnsFrom": [
950
+ "organization_id"
951
+ ],
952
+ "columnsTo": [
953
+ "id"
954
+ ],
955
+ "onDelete": "no action",
956
+ "onUpdate": "no action"
957
+ },
958
+ "invitations_member_id_members_id_fk": {
959
+ "name": "invitations_member_id_members_id_fk",
960
+ "tableFrom": "invitations",
961
+ "tableTo": "members",
962
+ "schemaTo": "app",
963
+ "columnsFrom": [
964
+ "member_id"
965
+ ],
966
+ "columnsTo": [
967
+ "id"
968
+ ],
969
+ "onDelete": "no action",
970
+ "onUpdate": "no action"
971
+ },
972
+ "invitations_inviter_id_users_id_fk": {
973
+ "name": "invitations_inviter_id_users_id_fk",
974
+ "tableFrom": "invitations",
975
+ "tableTo": "users",
976
+ "schemaTo": "app",
977
+ "columnsFrom": [
978
+ "inviter_id"
979
+ ],
980
+ "columnsTo": [
981
+ "id"
982
+ ],
983
+ "onDelete": "no action",
984
+ "onUpdate": "no action"
985
+ }
986
+ },
987
+ "compositePrimaryKeys": {},
988
+ "uniqueConstraints": {},
989
+ "policies": {},
990
+ "checkConstraints": {},
991
+ "isRLSEnabled": false
992
+ },
993
+ "app.jwks": {
994
+ "name": "jwks",
995
+ "schema": "app",
996
+ "columns": {
997
+ "id": {
998
+ "name": "id",
999
+ "type": "text",
1000
+ "primaryKey": true,
1001
+ "notNull": true
1002
+ },
1003
+ "public_key": {
1004
+ "name": "public_key",
1005
+ "type": "text",
1006
+ "primaryKey": false,
1007
+ "notNull": true
1008
+ },
1009
+ "private_key": {
1010
+ "name": "private_key",
1011
+ "type": "text",
1012
+ "primaryKey": false,
1013
+ "notNull": true
1014
+ },
1015
+ "created_at": {
1016
+ "name": "created_at",
1017
+ "type": "timestamp with time zone",
1018
+ "primaryKey": false,
1019
+ "notNull": true
1020
+ },
1021
+ "expires_at": {
1022
+ "name": "expires_at",
1023
+ "type": "timestamp with time zone",
1024
+ "primaryKey": false,
1025
+ "notNull": false
1026
+ },
1027
+ "alg": {
1028
+ "name": "alg",
1029
+ "type": "text",
1030
+ "primaryKey": false,
1031
+ "notNull": false
1032
+ },
1033
+ "crv": {
1034
+ "name": "crv",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": false
1038
+ }
1039
+ },
1040
+ "indexes": {},
1041
+ "foreignKeys": {},
1042
+ "compositePrimaryKeys": {},
1043
+ "uniqueConstraints": {},
1044
+ "policies": {},
1045
+ "checkConstraints": {},
1046
+ "isRLSEnabled": false
1047
+ },
1048
+ "app.mcp_allowlist_entries": {
1049
+ "name": "mcp_allowlist_entries",
1050
+ "schema": "app",
1051
+ "columns": {
1052
+ "id": {
1053
+ "name": "id",
1054
+ "type": "text",
1055
+ "primaryKey": true,
1056
+ "notNull": true
1057
+ },
1058
+ "oauth_client_id": {
1059
+ "name": "oauth_client_id",
1060
+ "type": "text",
1061
+ "primaryKey": false,
1062
+ "notNull": true
1063
+ },
1064
+ "user_id": {
1065
+ "name": "user_id",
1066
+ "type": "text",
1067
+ "primaryKey": false,
1068
+ "notNull": true
1069
+ },
1070
+ "organization_id": {
1071
+ "name": "organization_id",
1072
+ "type": "text",
1073
+ "primaryKey": false,
1074
+ "notNull": true
1075
+ },
1076
+ "created_at": {
1077
+ "name": "created_at",
1078
+ "type": "timestamp with time zone",
1079
+ "primaryKey": false,
1080
+ "notNull": true
1081
+ }
1082
+ },
1083
+ "indexes": {
1084
+ "mcp_allowlist_client_user_org_unique": {
1085
+ "name": "mcp_allowlist_client_user_org_unique",
1086
+ "columns": [
1087
+ {
1088
+ "expression": "oauth_client_id",
1089
+ "isExpression": false,
1090
+ "asc": true,
1091
+ "nulls": "last"
1092
+ },
1093
+ {
1094
+ "expression": "user_id",
1095
+ "isExpression": false,
1096
+ "asc": true,
1097
+ "nulls": "last"
1098
+ },
1099
+ {
1100
+ "expression": "organization_id",
1101
+ "isExpression": false,
1102
+ "asc": true,
1103
+ "nulls": "last"
1104
+ }
1105
+ ],
1106
+ "isUnique": true,
1107
+ "concurrently": false,
1108
+ "method": "btree",
1109
+ "with": {}
1110
+ }
1111
+ },
1112
+ "foreignKeys": {
1113
+ "mcp_allowlist_entries_user_id_users_id_fk": {
1114
+ "name": "mcp_allowlist_entries_user_id_users_id_fk",
1115
+ "tableFrom": "mcp_allowlist_entries",
1116
+ "tableTo": "users",
1117
+ "schemaTo": "app",
1118
+ "columnsFrom": [
1119
+ "user_id"
1120
+ ],
1121
+ "columnsTo": [
1122
+ "id"
1123
+ ],
1124
+ "onDelete": "cascade",
1125
+ "onUpdate": "no action"
1126
+ },
1127
+ "mcp_allowlist_entries_organization_id_organizations_id_fk": {
1128
+ "name": "mcp_allowlist_entries_organization_id_organizations_id_fk",
1129
+ "tableFrom": "mcp_allowlist_entries",
1130
+ "tableTo": "organizations",
1131
+ "schemaTo": "app",
1132
+ "columnsFrom": [
1133
+ "organization_id"
1134
+ ],
1135
+ "columnsTo": [
1136
+ "id"
1137
+ ],
1138
+ "onDelete": "cascade",
1139
+ "onUpdate": "no action"
1140
+ }
1141
+ },
1142
+ "compositePrimaryKeys": {},
1143
+ "uniqueConstraints": {},
1144
+ "policies": {},
1145
+ "checkConstraints": {},
1146
+ "isRLSEnabled": false
1147
+ },
1148
+ "app.members": {
1149
+ "name": "members",
1150
+ "schema": "app",
1151
+ "columns": {
1152
+ "id": {
1153
+ "name": "id",
1154
+ "type": "text",
1155
+ "primaryKey": true,
1156
+ "notNull": true
1157
+ },
1158
+ "organization_id": {
1159
+ "name": "organization_id",
1160
+ "type": "text",
1161
+ "primaryKey": false,
1162
+ "notNull": true
1163
+ },
1164
+ "user_id": {
1165
+ "name": "user_id",
1166
+ "type": "text",
1167
+ "primaryKey": false,
1168
+ "notNull": false
1169
+ },
1170
+ "email": {
1171
+ "name": "email",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": false
1175
+ },
1176
+ "name": {
1177
+ "name": "name",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
1181
+ "default": "''"
1182
+ },
1183
+ "image": {
1184
+ "name": "image",
1185
+ "type": "text",
1186
+ "primaryKey": false,
1187
+ "notNull": false
1188
+ },
1189
+ "role": {
1190
+ "name": "role",
1191
+ "type": "text",
1192
+ "primaryKey": false,
1193
+ "notNull": true
1194
+ },
1195
+ "created_at": {
1196
+ "name": "created_at",
1197
+ "type": "timestamp with time zone",
1198
+ "primaryKey": false,
1199
+ "notNull": true
1200
+ },
1201
+ "deleted_at": {
1202
+ "name": "deleted_at",
1203
+ "type": "timestamp with time zone",
1204
+ "primaryKey": false,
1205
+ "notNull": false
1206
+ },
1207
+ "preferences": {
1208
+ "name": "preferences",
1209
+ "type": "jsonb",
1210
+ "primaryKey": false,
1211
+ "notNull": false,
1212
+ "default": "'{}'::jsonb"
1213
+ },
1214
+ "metadata": {
1215
+ "name": "metadata",
1216
+ "type": "jsonb",
1217
+ "primaryKey": false,
1218
+ "notNull": false,
1219
+ "default": "'{}'::jsonb"
1220
+ },
1221
+ "onboarding": {
1222
+ "name": "onboarding",
1223
+ "type": "integer",
1224
+ "primaryKey": false,
1225
+ "notNull": false
1226
+ },
1227
+ "flags": {
1228
+ "name": "flags",
1229
+ "type": "text[]",
1230
+ "primaryKey": false,
1231
+ "notNull": false,
1232
+ "default": "'{}'"
1233
+ }
1234
+ },
1235
+ "indexes": {
1236
+ "members_attached_user_organization_unique": {
1237
+ "name": "members_attached_user_organization_unique",
1238
+ "columns": [
1239
+ {
1240
+ "expression": "user_id",
1241
+ "isExpression": false,
1242
+ "asc": true,
1243
+ "nulls": "last"
1244
+ },
1245
+ {
1246
+ "expression": "organization_id",
1247
+ "isExpression": false,
1248
+ "asc": true,
1249
+ "nulls": "last"
1250
+ }
1251
+ ],
1252
+ "isUnique": true,
1253
+ "where": "\"app\".\"members\".\"user_id\" is not null",
1254
+ "concurrently": false,
1255
+ "method": "btree",
1256
+ "with": {}
1257
+ },
1258
+ "members_live_pending_email_organization_unique": {
1259
+ "name": "members_live_pending_email_organization_unique",
1260
+ "columns": [
1261
+ {
1262
+ "expression": "email",
1263
+ "isExpression": false,
1264
+ "asc": true,
1265
+ "nulls": "last"
1266
+ },
1267
+ {
1268
+ "expression": "organization_id",
1269
+ "isExpression": false,
1270
+ "asc": true,
1271
+ "nulls": "last"
1272
+ }
1273
+ ],
1274
+ "isUnique": true,
1275
+ "where": "\"app\".\"members\".\"user_id\" is null and \"app\".\"members\".\"deleted_at\" is null",
1276
+ "concurrently": false,
1277
+ "method": "btree",
1278
+ "with": {}
1279
+ }
1280
+ },
1281
+ "foreignKeys": {
1282
+ "members_organization_id_organizations_id_fk": {
1283
+ "name": "members_organization_id_organizations_id_fk",
1284
+ "tableFrom": "members",
1285
+ "tableTo": "organizations",
1286
+ "schemaTo": "app",
1287
+ "columnsFrom": [
1288
+ "organization_id"
1289
+ ],
1290
+ "columnsTo": [
1291
+ "id"
1292
+ ],
1293
+ "onDelete": "no action",
1294
+ "onUpdate": "no action"
1295
+ },
1296
+ "members_user_id_users_id_fk": {
1297
+ "name": "members_user_id_users_id_fk",
1298
+ "tableFrom": "members",
1299
+ "tableTo": "users",
1300
+ "schemaTo": "app",
1301
+ "columnsFrom": [
1302
+ "user_id"
1303
+ ],
1304
+ "columnsTo": [
1305
+ "id"
1306
+ ],
1307
+ "onDelete": "no action",
1308
+ "onUpdate": "no action"
1309
+ }
1310
+ },
1311
+ "compositePrimaryKeys": {},
1312
+ "uniqueConstraints": {},
1313
+ "policies": {},
1314
+ "checkConstraints": {},
1315
+ "isRLSEnabled": false
1316
+ },
1317
+ "app.notification_devices": {
1318
+ "name": "notification_devices",
1319
+ "schema": "app",
1320
+ "columns": {
1321
+ "id": {
1322
+ "name": "id",
1323
+ "type": "text",
1324
+ "primaryKey": true,
1325
+ "notNull": true
1326
+ },
1327
+ "user_id": {
1328
+ "name": "user_id",
1329
+ "type": "text",
1330
+ "primaryKey": false,
1331
+ "notNull": true
1332
+ },
1333
+ "platform": {
1334
+ "name": "platform",
1335
+ "type": "text",
1336
+ "primaryKey": false,
1337
+ "notNull": true
1338
+ },
1339
+ "endpoint": {
1340
+ "name": "endpoint",
1341
+ "type": "text",
1342
+ "primaryKey": false,
1343
+ "notNull": false
1344
+ },
1345
+ "subscription": {
1346
+ "name": "subscription",
1347
+ "type": "jsonb",
1348
+ "primaryKey": false,
1349
+ "notNull": false
1350
+ },
1351
+ "token": {
1352
+ "name": "token",
1353
+ "type": "text",
1354
+ "primaryKey": false,
1355
+ "notNull": false
1356
+ },
1357
+ "label": {
1358
+ "name": "label",
1359
+ "type": "text",
1360
+ "primaryKey": false,
1361
+ "notNull": false
1362
+ },
1363
+ "enabled": {
1364
+ "name": "enabled",
1365
+ "type": "boolean",
1366
+ "primaryKey": false,
1367
+ "notNull": true,
1368
+ "default": true
1369
+ },
1370
+ "created_at": {
1371
+ "name": "created_at",
1372
+ "type": "timestamp with time zone",
1373
+ "primaryKey": false,
1374
+ "notNull": true
1375
+ },
1376
+ "updated_at": {
1377
+ "name": "updated_at",
1378
+ "type": "timestamp with time zone",
1379
+ "primaryKey": false,
1380
+ "notNull": true
1381
+ }
1382
+ },
1383
+ "indexes": {},
1384
+ "foreignKeys": {
1385
+ "notification_devices_user_id_users_id_fk": {
1386
+ "name": "notification_devices_user_id_users_id_fk",
1387
+ "tableFrom": "notification_devices",
1388
+ "tableTo": "users",
1389
+ "schemaTo": "app",
1390
+ "columnsFrom": [
1391
+ "user_id"
1392
+ ],
1393
+ "columnsTo": [
1394
+ "id"
1395
+ ],
1396
+ "onDelete": "cascade",
1397
+ "onUpdate": "no action"
1398
+ }
1399
+ },
1400
+ "compositePrimaryKeys": {},
1401
+ "uniqueConstraints": {
1402
+ "notification_devices_endpoint_unique": {
1403
+ "name": "notification_devices_endpoint_unique",
1404
+ "nullsNotDistinct": false,
1405
+ "columns": [
1406
+ "endpoint"
1407
+ ]
1408
+ },
1409
+ "notification_devices_token_unique": {
1410
+ "name": "notification_devices_token_unique",
1411
+ "nullsNotDistinct": false,
1412
+ "columns": [
1413
+ "token"
1414
+ ]
1415
+ }
1416
+ },
1417
+ "policies": {},
1418
+ "checkConstraints": {},
1419
+ "isRLSEnabled": false
1420
+ },
1421
+ "app.notification_preferences": {
1422
+ "name": "notification_preferences",
1423
+ "schema": "app",
1424
+ "columns": {
1425
+ "id": {
1426
+ "name": "id",
1427
+ "type": "text",
1428
+ "primaryKey": true,
1429
+ "notNull": true
1430
+ },
1431
+ "member_id": {
1432
+ "name": "member_id",
1433
+ "type": "text",
1434
+ "primaryKey": false,
1435
+ "notNull": true
1436
+ },
1437
+ "kind": {
1438
+ "name": "kind",
1439
+ "type": "text",
1440
+ "primaryKey": false,
1441
+ "notNull": true
1442
+ },
1443
+ "channel": {
1444
+ "name": "channel",
1445
+ "type": "text",
1446
+ "primaryKey": false,
1447
+ "notNull": true
1448
+ },
1449
+ "created_at": {
1450
+ "name": "created_at",
1451
+ "type": "timestamp with time zone",
1452
+ "primaryKey": false,
1453
+ "notNull": true
1454
+ },
1455
+ "updated_at": {
1456
+ "name": "updated_at",
1457
+ "type": "timestamp with time zone",
1458
+ "primaryKey": false,
1459
+ "notNull": true
1460
+ }
1461
+ },
1462
+ "indexes": {
1463
+ "notification_preferences_member_kind_channel_unique": {
1464
+ "name": "notification_preferences_member_kind_channel_unique",
1465
+ "columns": [
1466
+ {
1467
+ "expression": "member_id",
1468
+ "isExpression": false,
1469
+ "asc": true,
1470
+ "nulls": "last"
1471
+ },
1472
+ {
1473
+ "expression": "kind",
1474
+ "isExpression": false,
1475
+ "asc": true,
1476
+ "nulls": "last"
1477
+ },
1478
+ {
1479
+ "expression": "channel",
1480
+ "isExpression": false,
1481
+ "asc": true,
1482
+ "nulls": "last"
1483
+ }
1484
+ ],
1485
+ "isUnique": true,
1486
+ "concurrently": false,
1487
+ "method": "btree",
1488
+ "with": {}
1489
+ }
1490
+ },
1491
+ "foreignKeys": {
1492
+ "notification_preferences_member_id_members_id_fk": {
1493
+ "name": "notification_preferences_member_id_members_id_fk",
1494
+ "tableFrom": "notification_preferences",
1495
+ "tableTo": "members",
1496
+ "schemaTo": "app",
1497
+ "columnsFrom": [
1498
+ "member_id"
1499
+ ],
1500
+ "columnsTo": [
1501
+ "id"
1502
+ ],
1503
+ "onDelete": "cascade",
1504
+ "onUpdate": "no action"
1505
+ }
1506
+ },
1507
+ "compositePrimaryKeys": {},
1508
+ "uniqueConstraints": {},
1509
+ "policies": {},
1510
+ "checkConstraints": {},
1511
+ "isRLSEnabled": false
1512
+ },
1513
+ "app.notification_send_logs": {
1514
+ "name": "notification_send_logs",
1515
+ "schema": "app",
1516
+ "columns": {
1517
+ "id": {
1518
+ "name": "id",
1519
+ "type": "text",
1520
+ "primaryKey": true,
1521
+ "notNull": true
1522
+ },
1523
+ "batch_id": {
1524
+ "name": "batch_id",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": true
1528
+ },
1529
+ "notification_id": {
1530
+ "name": "notification_id",
1531
+ "type": "text",
1532
+ "primaryKey": false,
1533
+ "notNull": true
1534
+ },
1535
+ "user_id": {
1536
+ "name": "user_id",
1537
+ "type": "text",
1538
+ "primaryKey": false,
1539
+ "notNull": true
1540
+ },
1541
+ "device_id": {
1542
+ "name": "device_id",
1543
+ "type": "text",
1544
+ "primaryKey": false,
1545
+ "notNull": false
1546
+ },
1547
+ "channel": {
1548
+ "name": "channel",
1549
+ "type": "text",
1550
+ "primaryKey": false,
1551
+ "notNull": true
1552
+ },
1553
+ "provider": {
1554
+ "name": "provider",
1555
+ "type": "text",
1556
+ "primaryKey": false,
1557
+ "notNull": false
1558
+ },
1559
+ "title": {
1560
+ "name": "title",
1561
+ "type": "text",
1562
+ "primaryKey": false,
1563
+ "notNull": true
1564
+ },
1565
+ "body": {
1566
+ "name": "body",
1567
+ "type": "text",
1568
+ "primaryKey": false,
1569
+ "notNull": true
1570
+ },
1571
+ "data": {
1572
+ "name": "data",
1573
+ "type": "jsonb",
1574
+ "primaryKey": false,
1575
+ "notNull": false
1576
+ },
1577
+ "status": {
1578
+ "name": "status",
1579
+ "type": "text",
1580
+ "primaryKey": false,
1581
+ "notNull": true
1582
+ },
1583
+ "error": {
1584
+ "name": "error",
1585
+ "type": "text",
1586
+ "primaryKey": false,
1587
+ "notNull": false
1588
+ },
1589
+ "job_id": {
1590
+ "name": "job_id",
1591
+ "type": "text",
1592
+ "primaryKey": false,
1593
+ "notNull": false
1594
+ },
1595
+ "created_at": {
1596
+ "name": "created_at",
1597
+ "type": "timestamp with time zone",
1598
+ "primaryKey": false,
1599
+ "notNull": true
1600
+ },
1601
+ "updated_at": {
1602
+ "name": "updated_at",
1603
+ "type": "timestamp with time zone",
1604
+ "primaryKey": false,
1605
+ "notNull": true
1606
+ }
1607
+ },
1608
+ "indexes": {},
1609
+ "foreignKeys": {
1610
+ "notification_send_logs_notification_id_notifications_id_fk": {
1611
+ "name": "notification_send_logs_notification_id_notifications_id_fk",
1612
+ "tableFrom": "notification_send_logs",
1613
+ "tableTo": "notifications",
1614
+ "schemaTo": "app",
1615
+ "columnsFrom": [
1616
+ "notification_id"
1617
+ ],
1618
+ "columnsTo": [
1619
+ "id"
1620
+ ],
1621
+ "onDelete": "cascade",
1622
+ "onUpdate": "no action"
1623
+ },
1624
+ "notification_send_logs_user_id_users_id_fk": {
1625
+ "name": "notification_send_logs_user_id_users_id_fk",
1626
+ "tableFrom": "notification_send_logs",
1627
+ "tableTo": "users",
1628
+ "schemaTo": "app",
1629
+ "columnsFrom": [
1630
+ "user_id"
1631
+ ],
1632
+ "columnsTo": [
1633
+ "id"
1634
+ ],
1635
+ "onDelete": "cascade",
1636
+ "onUpdate": "no action"
1637
+ },
1638
+ "notification_send_logs_device_id_notification_devices_id_fk": {
1639
+ "name": "notification_send_logs_device_id_notification_devices_id_fk",
1640
+ "tableFrom": "notification_send_logs",
1641
+ "tableTo": "notification_devices",
1642
+ "schemaTo": "app",
1643
+ "columnsFrom": [
1644
+ "device_id"
1645
+ ],
1646
+ "columnsTo": [
1647
+ "id"
1648
+ ],
1649
+ "onDelete": "set null",
1650
+ "onUpdate": "no action"
1651
+ }
1652
+ },
1653
+ "compositePrimaryKeys": {},
1654
+ "uniqueConstraints": {},
1655
+ "policies": {},
1656
+ "checkConstraints": {},
1657
+ "isRLSEnabled": false
1658
+ },
1659
+ "app.notifications": {
1660
+ "name": "notifications",
1661
+ "schema": "app",
1662
+ "columns": {
1663
+ "id": {
1664
+ "name": "id",
1665
+ "type": "text",
1666
+ "primaryKey": true,
1667
+ "notNull": true
1668
+ },
1669
+ "member_id": {
1670
+ "name": "member_id",
1671
+ "type": "text",
1672
+ "primaryKey": false,
1673
+ "notNull": true
1674
+ },
1675
+ "user_id": {
1676
+ "name": "user_id",
1677
+ "type": "text",
1678
+ "primaryKey": false,
1679
+ "notNull": true
1680
+ },
1681
+ "kind": {
1682
+ "name": "kind",
1683
+ "type": "text",
1684
+ "primaryKey": false,
1685
+ "notNull": true
1686
+ },
1687
+ "title": {
1688
+ "name": "title",
1689
+ "type": "text",
1690
+ "primaryKey": false,
1691
+ "notNull": true
1692
+ },
1693
+ "body": {
1694
+ "name": "body",
1695
+ "type": "text",
1696
+ "primaryKey": false,
1697
+ "notNull": true
1698
+ },
1699
+ "data": {
1700
+ "name": "data",
1701
+ "type": "jsonb",
1702
+ "primaryKey": false,
1703
+ "notNull": false
1704
+ },
1705
+ "visible_in_inbox": {
1706
+ "name": "visible_in_inbox",
1707
+ "type": "boolean",
1708
+ "primaryKey": false,
1709
+ "notNull": true,
1710
+ "default": false
1711
+ },
1712
+ "armed_channels": {
1713
+ "name": "armed_channels",
1714
+ "type": "text[]",
1715
+ "primaryKey": false,
1716
+ "notNull": true,
1717
+ "default": "'{}'"
1718
+ },
1719
+ "web_pushed_at": {
1720
+ "name": "web_pushed_at",
1721
+ "type": "timestamp with time zone",
1722
+ "primaryKey": false,
1723
+ "notNull": false
1724
+ },
1725
+ "mobile_pushed_at": {
1726
+ "name": "mobile_pushed_at",
1727
+ "type": "timestamp with time zone",
1728
+ "primaryKey": false,
1729
+ "notNull": false
1730
+ },
1731
+ "emailed_at": {
1732
+ "name": "emailed_at",
1733
+ "type": "timestamp with time zone",
1734
+ "primaryKey": false,
1735
+ "notNull": false
1736
+ },
1737
+ "read_at": {
1738
+ "name": "read_at",
1739
+ "type": "timestamp with time zone",
1740
+ "primaryKey": false,
1741
+ "notNull": false
1742
+ },
1743
+ "created_at": {
1744
+ "name": "created_at",
1745
+ "type": "timestamp with time zone",
1746
+ "primaryKey": false,
1747
+ "notNull": true
1748
+ },
1749
+ "updated_at": {
1750
+ "name": "updated_at",
1751
+ "type": "timestamp with time zone",
1752
+ "primaryKey": false,
1753
+ "notNull": true
1754
+ }
1755
+ },
1756
+ "indexes": {},
1757
+ "foreignKeys": {
1758
+ "notifications_member_id_members_id_fk": {
1759
+ "name": "notifications_member_id_members_id_fk",
1760
+ "tableFrom": "notifications",
1761
+ "tableTo": "members",
1762
+ "schemaTo": "app",
1763
+ "columnsFrom": [
1764
+ "member_id"
1765
+ ],
1766
+ "columnsTo": [
1767
+ "id"
1768
+ ],
1769
+ "onDelete": "cascade",
1770
+ "onUpdate": "no action"
1771
+ },
1772
+ "notifications_user_id_users_id_fk": {
1773
+ "name": "notifications_user_id_users_id_fk",
1774
+ "tableFrom": "notifications",
1775
+ "tableTo": "users",
1776
+ "schemaTo": "app",
1777
+ "columnsFrom": [
1778
+ "user_id"
1779
+ ],
1780
+ "columnsTo": [
1781
+ "id"
1782
+ ],
1783
+ "onDelete": "cascade",
1784
+ "onUpdate": "no action"
1785
+ }
1786
+ },
1787
+ "compositePrimaryKeys": {},
1788
+ "uniqueConstraints": {},
1789
+ "policies": {},
1790
+ "checkConstraints": {},
1791
+ "isRLSEnabled": false
1792
+ },
1793
+ "app.oauth_access_tokens": {
1794
+ "name": "oauth_access_tokens",
1795
+ "schema": "app",
1796
+ "columns": {
1797
+ "id": {
1798
+ "name": "id",
1799
+ "type": "text",
1800
+ "primaryKey": true,
1801
+ "notNull": true
1802
+ },
1803
+ "token": {
1804
+ "name": "token",
1805
+ "type": "text",
1806
+ "primaryKey": false,
1807
+ "notNull": false
1808
+ },
1809
+ "client_id": {
1810
+ "name": "client_id",
1811
+ "type": "text",
1812
+ "primaryKey": false,
1813
+ "notNull": true
1814
+ },
1815
+ "session_id": {
1816
+ "name": "session_id",
1817
+ "type": "text",
1818
+ "primaryKey": false,
1819
+ "notNull": false
1820
+ },
1821
+ "user_id": {
1822
+ "name": "user_id",
1823
+ "type": "text",
1824
+ "primaryKey": false,
1825
+ "notNull": false
1826
+ },
1827
+ "reference_id": {
1828
+ "name": "reference_id",
1829
+ "type": "text",
1830
+ "primaryKey": false,
1831
+ "notNull": false
1832
+ },
1833
+ "authorization_code_id": {
1834
+ "name": "authorization_code_id",
1835
+ "type": "text",
1836
+ "primaryKey": false,
1837
+ "notNull": false
1838
+ },
1839
+ "resources": {
1840
+ "name": "resources",
1841
+ "type": "text[]",
1842
+ "primaryKey": false,
1843
+ "notNull": false
1844
+ },
1845
+ "requested_user_info_claims": {
1846
+ "name": "requested_user_info_claims",
1847
+ "type": "text[]",
1848
+ "primaryKey": false,
1849
+ "notNull": false
1850
+ },
1851
+ "refresh_id": {
1852
+ "name": "refresh_id",
1853
+ "type": "text",
1854
+ "primaryKey": false,
1855
+ "notNull": false
1856
+ },
1857
+ "expires_at": {
1858
+ "name": "expires_at",
1859
+ "type": "timestamp with time zone",
1860
+ "primaryKey": false,
1861
+ "notNull": true
1862
+ },
1863
+ "created_at": {
1864
+ "name": "created_at",
1865
+ "type": "timestamp with time zone",
1866
+ "primaryKey": false,
1867
+ "notNull": true
1868
+ },
1869
+ "revoked": {
1870
+ "name": "revoked",
1871
+ "type": "timestamp with time zone",
1872
+ "primaryKey": false,
1873
+ "notNull": false
1874
+ },
1875
+ "confirmation": {
1876
+ "name": "confirmation",
1877
+ "type": "jsonb",
1878
+ "primaryKey": false,
1879
+ "notNull": false
1880
+ },
1881
+ "scopes": {
1882
+ "name": "scopes",
1883
+ "type": "text[]",
1884
+ "primaryKey": false,
1885
+ "notNull": true
1886
+ }
1887
+ },
1888
+ "indexes": {},
1889
+ "foreignKeys": {
1890
+ "oauth_access_tokens_client_id_oauth_clients_client_id_fk": {
1891
+ "name": "oauth_access_tokens_client_id_oauth_clients_client_id_fk",
1892
+ "tableFrom": "oauth_access_tokens",
1893
+ "tableTo": "oauth_clients",
1894
+ "schemaTo": "app",
1895
+ "columnsFrom": [
1896
+ "client_id"
1897
+ ],
1898
+ "columnsTo": [
1899
+ "client_id"
1900
+ ],
1901
+ "onDelete": "no action",
1902
+ "onUpdate": "no action"
1903
+ },
1904
+ "oauth_access_tokens_session_id_sessions_id_fk": {
1905
+ "name": "oauth_access_tokens_session_id_sessions_id_fk",
1906
+ "tableFrom": "oauth_access_tokens",
1907
+ "tableTo": "sessions",
1908
+ "schemaTo": "app",
1909
+ "columnsFrom": [
1910
+ "session_id"
1911
+ ],
1912
+ "columnsTo": [
1913
+ "id"
1914
+ ],
1915
+ "onDelete": "set null",
1916
+ "onUpdate": "no action"
1917
+ },
1918
+ "oauth_access_tokens_user_id_users_id_fk": {
1919
+ "name": "oauth_access_tokens_user_id_users_id_fk",
1920
+ "tableFrom": "oauth_access_tokens",
1921
+ "tableTo": "users",
1922
+ "schemaTo": "app",
1923
+ "columnsFrom": [
1924
+ "user_id"
1925
+ ],
1926
+ "columnsTo": [
1927
+ "id"
1928
+ ],
1929
+ "onDelete": "no action",
1930
+ "onUpdate": "no action"
1931
+ },
1932
+ "oauth_access_tokens_refresh_id_oauth_refresh_tokens_id_fk": {
1933
+ "name": "oauth_access_tokens_refresh_id_oauth_refresh_tokens_id_fk",
1934
+ "tableFrom": "oauth_access_tokens",
1935
+ "tableTo": "oauth_refresh_tokens",
1936
+ "schemaTo": "app",
1937
+ "columnsFrom": [
1938
+ "refresh_id"
1939
+ ],
1940
+ "columnsTo": [
1941
+ "id"
1942
+ ],
1943
+ "onDelete": "no action",
1944
+ "onUpdate": "no action"
1945
+ }
1946
+ },
1947
+ "compositePrimaryKeys": {},
1948
+ "uniqueConstraints": {
1949
+ "oauth_access_tokens_token_unique": {
1950
+ "name": "oauth_access_tokens_token_unique",
1951
+ "nullsNotDistinct": false,
1952
+ "columns": [
1953
+ "token"
1954
+ ]
1955
+ }
1956
+ },
1957
+ "policies": {},
1958
+ "checkConstraints": {},
1959
+ "isRLSEnabled": false
1960
+ },
1961
+ "app.oauth_client_assertions": {
1962
+ "name": "oauth_client_assertions",
1963
+ "schema": "app",
1964
+ "columns": {
1965
+ "id": {
1966
+ "name": "id",
1967
+ "type": "text",
1968
+ "primaryKey": true,
1969
+ "notNull": true
1970
+ },
1971
+ "expires_at": {
1972
+ "name": "expires_at",
1973
+ "type": "timestamp with time zone",
1974
+ "primaryKey": false,
1975
+ "notNull": true
1976
+ }
1977
+ },
1978
+ "indexes": {},
1979
+ "foreignKeys": {},
1980
+ "compositePrimaryKeys": {},
1981
+ "uniqueConstraints": {},
1982
+ "policies": {},
1983
+ "checkConstraints": {},
1984
+ "isRLSEnabled": false
1985
+ },
1986
+ "app.oauth_client_resources": {
1987
+ "name": "oauth_client_resources",
1988
+ "schema": "app",
1989
+ "columns": {
1990
+ "id": {
1991
+ "name": "id",
1992
+ "type": "text",
1993
+ "primaryKey": true,
1994
+ "notNull": true
1995
+ },
1996
+ "client_id": {
1997
+ "name": "client_id",
1998
+ "type": "text",
1999
+ "primaryKey": false,
2000
+ "notNull": true
2001
+ },
2002
+ "resource_id": {
2003
+ "name": "resource_id",
2004
+ "type": "text",
2005
+ "primaryKey": false,
2006
+ "notNull": true
2007
+ },
2008
+ "metadata": {
2009
+ "name": "metadata",
2010
+ "type": "jsonb",
2011
+ "primaryKey": false,
2012
+ "notNull": false
2013
+ },
2014
+ "created_at": {
2015
+ "name": "created_at",
2016
+ "type": "timestamp with time zone",
2017
+ "primaryKey": false,
2018
+ "notNull": false
2019
+ }
2020
+ },
2021
+ "indexes": {
2022
+ "oauth_client_resources_client_resource_unique": {
2023
+ "name": "oauth_client_resources_client_resource_unique",
2024
+ "columns": [
2025
+ {
2026
+ "expression": "client_id",
2027
+ "isExpression": false,
2028
+ "asc": true,
2029
+ "nulls": "last"
2030
+ },
2031
+ {
2032
+ "expression": "resource_id",
2033
+ "isExpression": false,
2034
+ "asc": true,
2035
+ "nulls": "last"
2036
+ }
2037
+ ],
2038
+ "isUnique": true,
2039
+ "concurrently": false,
2040
+ "method": "btree",
2041
+ "with": {}
2042
+ }
2043
+ },
2044
+ "foreignKeys": {
2045
+ "oauth_client_resources_client_id_oauth_clients_client_id_fk": {
2046
+ "name": "oauth_client_resources_client_id_oauth_clients_client_id_fk",
2047
+ "tableFrom": "oauth_client_resources",
2048
+ "tableTo": "oauth_clients",
2049
+ "schemaTo": "app",
2050
+ "columnsFrom": [
2051
+ "client_id"
2052
+ ],
2053
+ "columnsTo": [
2054
+ "client_id"
2055
+ ],
2056
+ "onDelete": "cascade",
2057
+ "onUpdate": "no action"
2058
+ },
2059
+ "oauth_client_resources_resource_id_oauth_resources_identifier_fk": {
2060
+ "name": "oauth_client_resources_resource_id_oauth_resources_identifier_fk",
2061
+ "tableFrom": "oauth_client_resources",
2062
+ "tableTo": "oauth_resources",
2063
+ "schemaTo": "app",
2064
+ "columnsFrom": [
2065
+ "resource_id"
2066
+ ],
2067
+ "columnsTo": [
2068
+ "identifier"
2069
+ ],
2070
+ "onDelete": "cascade",
2071
+ "onUpdate": "no action"
2072
+ }
2073
+ },
2074
+ "compositePrimaryKeys": {},
2075
+ "uniqueConstraints": {},
2076
+ "policies": {},
2077
+ "checkConstraints": {},
2078
+ "isRLSEnabled": false
2079
+ },
2080
+ "app.oauth_clients": {
2081
+ "name": "oauth_clients",
2082
+ "schema": "app",
2083
+ "columns": {
2084
+ "id": {
2085
+ "name": "id",
2086
+ "type": "text",
2087
+ "primaryKey": true,
2088
+ "notNull": true
2089
+ },
2090
+ "client_id": {
2091
+ "name": "client_id",
2092
+ "type": "text",
2093
+ "primaryKey": false,
2094
+ "notNull": true
2095
+ },
2096
+ "client_secret": {
2097
+ "name": "client_secret",
2098
+ "type": "text",
2099
+ "primaryKey": false,
2100
+ "notNull": false
2101
+ },
2102
+ "client_discovery_id": {
2103
+ "name": "client_discovery_id",
2104
+ "type": "text",
2105
+ "primaryKey": false,
2106
+ "notNull": false
2107
+ },
2108
+ "disabled": {
2109
+ "name": "disabled",
2110
+ "type": "boolean",
2111
+ "primaryKey": false,
2112
+ "notNull": false,
2113
+ "default": false
2114
+ },
2115
+ "skip_consent": {
2116
+ "name": "skip_consent",
2117
+ "type": "boolean",
2118
+ "primaryKey": false,
2119
+ "notNull": false
2120
+ },
2121
+ "enable_end_session": {
2122
+ "name": "enable_end_session",
2123
+ "type": "boolean",
2124
+ "primaryKey": false,
2125
+ "notNull": false
2126
+ },
2127
+ "subject_type": {
2128
+ "name": "subject_type",
2129
+ "type": "text",
2130
+ "primaryKey": false,
2131
+ "notNull": false
2132
+ },
2133
+ "scopes": {
2134
+ "name": "scopes",
2135
+ "type": "text[]",
2136
+ "primaryKey": false,
2137
+ "notNull": false
2138
+ },
2139
+ "client_credentials_scopes": {
2140
+ "name": "client_credentials_scopes",
2141
+ "type": "text[]",
2142
+ "primaryKey": false,
2143
+ "notNull": false,
2144
+ "default": "'{}'"
2145
+ },
2146
+ "user_id": {
2147
+ "name": "user_id",
2148
+ "type": "text",
2149
+ "primaryKey": false,
2150
+ "notNull": false
2151
+ },
2152
+ "created_at": {
2153
+ "name": "created_at",
2154
+ "type": "timestamp with time zone",
2155
+ "primaryKey": false,
2156
+ "notNull": false
2157
+ },
2158
+ "updated_at": {
2159
+ "name": "updated_at",
2160
+ "type": "timestamp with time zone",
2161
+ "primaryKey": false,
2162
+ "notNull": false
2163
+ },
2164
+ "name": {
2165
+ "name": "name",
2166
+ "type": "text",
2167
+ "primaryKey": false,
2168
+ "notNull": false
2169
+ },
2170
+ "uri": {
2171
+ "name": "uri",
2172
+ "type": "text",
2173
+ "primaryKey": false,
2174
+ "notNull": false
2175
+ },
2176
+ "icon": {
2177
+ "name": "icon",
2178
+ "type": "text",
2179
+ "primaryKey": false,
2180
+ "notNull": false
2181
+ },
2182
+ "contacts": {
2183
+ "name": "contacts",
2184
+ "type": "text[]",
2185
+ "primaryKey": false,
2186
+ "notNull": false
2187
+ },
2188
+ "tos": {
2189
+ "name": "tos",
2190
+ "type": "text",
2191
+ "primaryKey": false,
2192
+ "notNull": false
2193
+ },
2194
+ "policy": {
2195
+ "name": "policy",
2196
+ "type": "text",
2197
+ "primaryKey": false,
2198
+ "notNull": false
2199
+ },
2200
+ "software_id": {
2201
+ "name": "software_id",
2202
+ "type": "text",
2203
+ "primaryKey": false,
2204
+ "notNull": false
2205
+ },
2206
+ "software_version": {
2207
+ "name": "software_version",
2208
+ "type": "text",
2209
+ "primaryKey": false,
2210
+ "notNull": false
2211
+ },
2212
+ "software_statement": {
2213
+ "name": "software_statement",
2214
+ "type": "text",
2215
+ "primaryKey": false,
2216
+ "notNull": false
2217
+ },
2218
+ "redirect_uris": {
2219
+ "name": "redirect_uris",
2220
+ "type": "text[]",
2221
+ "primaryKey": false,
2222
+ "notNull": true
2223
+ },
2224
+ "post_logout_redirect_uris": {
2225
+ "name": "post_logout_redirect_uris",
2226
+ "type": "text[]",
2227
+ "primaryKey": false,
2228
+ "notNull": false
2229
+ },
2230
+ "backchannel_logout_uri": {
2231
+ "name": "backchannel_logout_uri",
2232
+ "type": "text",
2233
+ "primaryKey": false,
2234
+ "notNull": false
2235
+ },
2236
+ "backchannel_logout_session_required": {
2237
+ "name": "backchannel_logout_session_required",
2238
+ "type": "boolean",
2239
+ "primaryKey": false,
2240
+ "notNull": false
2241
+ },
2242
+ "token_endpoint_auth_method": {
2243
+ "name": "token_endpoint_auth_method",
2244
+ "type": "text",
2245
+ "primaryKey": false,
2246
+ "notNull": false
2247
+ },
2248
+ "application_type": {
2249
+ "name": "application_type",
2250
+ "type": "text",
2251
+ "primaryKey": false,
2252
+ "notNull": false
2253
+ },
2254
+ "jwks": {
2255
+ "name": "jwks",
2256
+ "type": "text",
2257
+ "primaryKey": false,
2258
+ "notNull": false
2259
+ },
2260
+ "jwks_uri": {
2261
+ "name": "jwks_uri",
2262
+ "type": "text",
2263
+ "primaryKey": false,
2264
+ "notNull": false
2265
+ },
2266
+ "grant_types": {
2267
+ "name": "grant_types",
2268
+ "type": "text[]",
2269
+ "primaryKey": false,
2270
+ "notNull": false
2271
+ },
2272
+ "response_types": {
2273
+ "name": "response_types",
2274
+ "type": "text[]",
2275
+ "primaryKey": false,
2276
+ "notNull": false
2277
+ },
2278
+ "require_pkce": {
2279
+ "name": "require_pkce",
2280
+ "type": "boolean",
2281
+ "primaryKey": false,
2282
+ "notNull": false
2283
+ },
2284
+ "dpop_bound_access_tokens": {
2285
+ "name": "dpop_bound_access_tokens",
2286
+ "type": "boolean",
2287
+ "primaryKey": false,
2288
+ "notNull": false,
2289
+ "default": false
2290
+ },
2291
+ "reference_id": {
2292
+ "name": "reference_id",
2293
+ "type": "text",
2294
+ "primaryKey": false,
2295
+ "notNull": false
2296
+ },
2297
+ "metadata": {
2298
+ "name": "metadata",
2299
+ "type": "jsonb",
2300
+ "primaryKey": false,
2301
+ "notNull": false
2302
+ }
2303
+ },
2304
+ "indexes": {},
2305
+ "foreignKeys": {
2306
+ "oauth_clients_user_id_users_id_fk": {
2307
+ "name": "oauth_clients_user_id_users_id_fk",
2308
+ "tableFrom": "oauth_clients",
2309
+ "tableTo": "users",
2310
+ "schemaTo": "app",
2311
+ "columnsFrom": [
2312
+ "user_id"
2313
+ ],
2314
+ "columnsTo": [
2315
+ "id"
2316
+ ],
2317
+ "onDelete": "no action",
2318
+ "onUpdate": "no action"
2319
+ }
2320
+ },
2321
+ "compositePrimaryKeys": {},
2322
+ "uniqueConstraints": {
2323
+ "oauth_clients_client_id_unique": {
2324
+ "name": "oauth_clients_client_id_unique",
2325
+ "nullsNotDistinct": false,
2326
+ "columns": [
2327
+ "client_id"
2328
+ ]
2329
+ }
2330
+ },
2331
+ "policies": {},
2332
+ "checkConstraints": {},
2333
+ "isRLSEnabled": false
2334
+ },
2335
+ "app.oauth_consents": {
2336
+ "name": "oauth_consents",
2337
+ "schema": "app",
2338
+ "columns": {
2339
+ "id": {
2340
+ "name": "id",
2341
+ "type": "text",
2342
+ "primaryKey": true,
2343
+ "notNull": true
2344
+ },
2345
+ "client_id": {
2346
+ "name": "client_id",
2347
+ "type": "text",
2348
+ "primaryKey": false,
2349
+ "notNull": true
2350
+ },
2351
+ "user_id": {
2352
+ "name": "user_id",
2353
+ "type": "text",
2354
+ "primaryKey": false,
2355
+ "notNull": false
2356
+ },
2357
+ "reference_id": {
2358
+ "name": "reference_id",
2359
+ "type": "text",
2360
+ "primaryKey": false,
2361
+ "notNull": false
2362
+ },
2363
+ "resources": {
2364
+ "name": "resources",
2365
+ "type": "text[]",
2366
+ "primaryKey": false,
2367
+ "notNull": false
2368
+ },
2369
+ "requested_user_info_claims": {
2370
+ "name": "requested_user_info_claims",
2371
+ "type": "text[]",
2372
+ "primaryKey": false,
2373
+ "notNull": false
2374
+ },
2375
+ "scopes": {
2376
+ "name": "scopes",
2377
+ "type": "text[]",
2378
+ "primaryKey": false,
2379
+ "notNull": true
2380
+ },
2381
+ "created_at": {
2382
+ "name": "created_at",
2383
+ "type": "timestamp with time zone",
2384
+ "primaryKey": false,
2385
+ "notNull": true
2386
+ },
2387
+ "updated_at": {
2388
+ "name": "updated_at",
2389
+ "type": "timestamp with time zone",
2390
+ "primaryKey": false,
2391
+ "notNull": true
2392
+ }
2393
+ },
2394
+ "indexes": {},
2395
+ "foreignKeys": {
2396
+ "oauth_consents_client_id_oauth_clients_client_id_fk": {
2397
+ "name": "oauth_consents_client_id_oauth_clients_client_id_fk",
2398
+ "tableFrom": "oauth_consents",
2399
+ "tableTo": "oauth_clients",
2400
+ "schemaTo": "app",
2401
+ "columnsFrom": [
2402
+ "client_id"
2403
+ ],
2404
+ "columnsTo": [
2405
+ "client_id"
2406
+ ],
2407
+ "onDelete": "no action",
2408
+ "onUpdate": "no action"
2409
+ },
2410
+ "oauth_consents_user_id_users_id_fk": {
2411
+ "name": "oauth_consents_user_id_users_id_fk",
2412
+ "tableFrom": "oauth_consents",
2413
+ "tableTo": "users",
2414
+ "schemaTo": "app",
2415
+ "columnsFrom": [
2416
+ "user_id"
2417
+ ],
2418
+ "columnsTo": [
2419
+ "id"
2420
+ ],
2421
+ "onDelete": "no action",
2422
+ "onUpdate": "no action"
2423
+ }
2424
+ },
2425
+ "compositePrimaryKeys": {},
2426
+ "uniqueConstraints": {},
2427
+ "policies": {},
2428
+ "checkConstraints": {},
2429
+ "isRLSEnabled": false
2430
+ },
2431
+ "app.oauth_refresh_tokens": {
2432
+ "name": "oauth_refresh_tokens",
2433
+ "schema": "app",
2434
+ "columns": {
2435
+ "id": {
2436
+ "name": "id",
2437
+ "type": "text",
2438
+ "primaryKey": true,
2439
+ "notNull": true
2440
+ },
2441
+ "token": {
2442
+ "name": "token",
2443
+ "type": "text",
2444
+ "primaryKey": false,
2445
+ "notNull": true
2446
+ },
2447
+ "client_id": {
2448
+ "name": "client_id",
2449
+ "type": "text",
2450
+ "primaryKey": false,
2451
+ "notNull": true
2452
+ },
2453
+ "session_id": {
2454
+ "name": "session_id",
2455
+ "type": "text",
2456
+ "primaryKey": false,
2457
+ "notNull": false
2458
+ },
2459
+ "user_id": {
2460
+ "name": "user_id",
2461
+ "type": "text",
2462
+ "primaryKey": false,
2463
+ "notNull": true
2464
+ },
2465
+ "reference_id": {
2466
+ "name": "reference_id",
2467
+ "type": "text",
2468
+ "primaryKey": false,
2469
+ "notNull": false
2470
+ },
2471
+ "authorization_code_id": {
2472
+ "name": "authorization_code_id",
2473
+ "type": "text",
2474
+ "primaryKey": false,
2475
+ "notNull": false
2476
+ },
2477
+ "resources": {
2478
+ "name": "resources",
2479
+ "type": "text[]",
2480
+ "primaryKey": false,
2481
+ "notNull": false
2482
+ },
2483
+ "requested_user_info_claims": {
2484
+ "name": "requested_user_info_claims",
2485
+ "type": "text[]",
2486
+ "primaryKey": false,
2487
+ "notNull": false
2488
+ },
2489
+ "expires_at": {
2490
+ "name": "expires_at",
2491
+ "type": "timestamp with time zone",
2492
+ "primaryKey": false,
2493
+ "notNull": true
2494
+ },
2495
+ "created_at": {
2496
+ "name": "created_at",
2497
+ "type": "timestamp with time zone",
2498
+ "primaryKey": false,
2499
+ "notNull": true
2500
+ },
2501
+ "revoked": {
2502
+ "name": "revoked",
2503
+ "type": "timestamp with time zone",
2504
+ "primaryKey": false,
2505
+ "notNull": false
2506
+ },
2507
+ "rotated_at": {
2508
+ "name": "rotated_at",
2509
+ "type": "timestamp with time zone",
2510
+ "primaryKey": false,
2511
+ "notNull": false
2512
+ },
2513
+ "rotation_replay_response": {
2514
+ "name": "rotation_replay_response",
2515
+ "type": "text",
2516
+ "primaryKey": false,
2517
+ "notNull": false
2518
+ },
2519
+ "rotation_replay_expires_at": {
2520
+ "name": "rotation_replay_expires_at",
2521
+ "type": "timestamp with time zone",
2522
+ "primaryKey": false,
2523
+ "notNull": false
2524
+ },
2525
+ "auth_time": {
2526
+ "name": "auth_time",
2527
+ "type": "timestamp with time zone",
2528
+ "primaryKey": false,
2529
+ "notNull": false
2530
+ },
2531
+ "confirmation": {
2532
+ "name": "confirmation",
2533
+ "type": "jsonb",
2534
+ "primaryKey": false,
2535
+ "notNull": false
2536
+ },
2537
+ "scopes": {
2538
+ "name": "scopes",
2539
+ "type": "text[]",
2540
+ "primaryKey": false,
2541
+ "notNull": true
2542
+ }
2543
+ },
2544
+ "indexes": {},
2545
+ "foreignKeys": {
2546
+ "oauth_refresh_tokens_client_id_oauth_clients_client_id_fk": {
2547
+ "name": "oauth_refresh_tokens_client_id_oauth_clients_client_id_fk",
2548
+ "tableFrom": "oauth_refresh_tokens",
2549
+ "tableTo": "oauth_clients",
2550
+ "schemaTo": "app",
2551
+ "columnsFrom": [
2552
+ "client_id"
2553
+ ],
2554
+ "columnsTo": [
2555
+ "client_id"
2556
+ ],
2557
+ "onDelete": "no action",
2558
+ "onUpdate": "no action"
2559
+ },
2560
+ "oauth_refresh_tokens_session_id_sessions_id_fk": {
2561
+ "name": "oauth_refresh_tokens_session_id_sessions_id_fk",
2562
+ "tableFrom": "oauth_refresh_tokens",
2563
+ "tableTo": "sessions",
2564
+ "schemaTo": "app",
2565
+ "columnsFrom": [
2566
+ "session_id"
2567
+ ],
2568
+ "columnsTo": [
2569
+ "id"
2570
+ ],
2571
+ "onDelete": "set null",
2572
+ "onUpdate": "no action"
2573
+ },
2574
+ "oauth_refresh_tokens_user_id_users_id_fk": {
2575
+ "name": "oauth_refresh_tokens_user_id_users_id_fk",
2576
+ "tableFrom": "oauth_refresh_tokens",
2577
+ "tableTo": "users",
2578
+ "schemaTo": "app",
2579
+ "columnsFrom": [
2580
+ "user_id"
2581
+ ],
2582
+ "columnsTo": [
2583
+ "id"
2584
+ ],
2585
+ "onDelete": "no action",
2586
+ "onUpdate": "no action"
2587
+ }
2588
+ },
2589
+ "compositePrimaryKeys": {},
2590
+ "uniqueConstraints": {
2591
+ "oauth_refresh_tokens_token_unique": {
2592
+ "name": "oauth_refresh_tokens_token_unique",
2593
+ "nullsNotDistinct": false,
2594
+ "columns": [
2595
+ "token"
2596
+ ]
2597
+ }
2598
+ },
2599
+ "policies": {},
2600
+ "checkConstraints": {},
2601
+ "isRLSEnabled": false
2602
+ },
2603
+ "app.oauth_resources": {
2604
+ "name": "oauth_resources",
2605
+ "schema": "app",
2606
+ "columns": {
2607
+ "id": {
2608
+ "name": "id",
2609
+ "type": "text",
2610
+ "primaryKey": true,
2611
+ "notNull": true
2612
+ },
2613
+ "identifier": {
2614
+ "name": "identifier",
2615
+ "type": "text",
2616
+ "primaryKey": false,
2617
+ "notNull": true
2618
+ },
2619
+ "name": {
2620
+ "name": "name",
2621
+ "type": "text",
2622
+ "primaryKey": false,
2623
+ "notNull": true
2624
+ },
2625
+ "access_token_ttl": {
2626
+ "name": "access_token_ttl",
2627
+ "type": "integer",
2628
+ "primaryKey": false,
2629
+ "notNull": false
2630
+ },
2631
+ "refresh_token_ttl": {
2632
+ "name": "refresh_token_ttl",
2633
+ "type": "integer",
2634
+ "primaryKey": false,
2635
+ "notNull": false
2636
+ },
2637
+ "signing_algorithm": {
2638
+ "name": "signing_algorithm",
2639
+ "type": "text",
2640
+ "primaryKey": false,
2641
+ "notNull": false
2642
+ },
2643
+ "signing_key_id": {
2644
+ "name": "signing_key_id",
2645
+ "type": "text",
2646
+ "primaryKey": false,
2647
+ "notNull": false
2648
+ },
2649
+ "allowed_scopes": {
2650
+ "name": "allowed_scopes",
2651
+ "type": "text[]",
2652
+ "primaryKey": false,
2653
+ "notNull": false
2654
+ },
2655
+ "custom_claims": {
2656
+ "name": "custom_claims",
2657
+ "type": "jsonb",
2658
+ "primaryKey": false,
2659
+ "notNull": false
2660
+ },
2661
+ "dpop_bound_access_tokens_required": {
2662
+ "name": "dpop_bound_access_tokens_required",
2663
+ "type": "boolean",
2664
+ "primaryKey": false,
2665
+ "notNull": false,
2666
+ "default": false
2667
+ },
2668
+ "disabled": {
2669
+ "name": "disabled",
2670
+ "type": "boolean",
2671
+ "primaryKey": false,
2672
+ "notNull": false,
2673
+ "default": false
2674
+ },
2675
+ "created_at": {
2676
+ "name": "created_at",
2677
+ "type": "timestamp with time zone",
2678
+ "primaryKey": false,
2679
+ "notNull": false
2680
+ },
2681
+ "updated_at": {
2682
+ "name": "updated_at",
2683
+ "type": "timestamp with time zone",
2684
+ "primaryKey": false,
2685
+ "notNull": false
2686
+ },
2687
+ "policy_version": {
2688
+ "name": "policy_version",
2689
+ "type": "integer",
2690
+ "primaryKey": false,
2691
+ "notNull": false,
2692
+ "default": 1
2693
+ },
2694
+ "metadata": {
2695
+ "name": "metadata",
2696
+ "type": "jsonb",
2697
+ "primaryKey": false,
2698
+ "notNull": false
2699
+ }
2700
+ },
2701
+ "indexes": {},
2702
+ "foreignKeys": {},
2703
+ "compositePrimaryKeys": {},
2704
+ "uniqueConstraints": {
2705
+ "oauth_resources_identifier_unique": {
2706
+ "name": "oauth_resources_identifier_unique",
2707
+ "nullsNotDistinct": false,
2708
+ "columns": [
2709
+ "identifier"
2710
+ ]
2711
+ }
2712
+ },
2713
+ "policies": {},
2714
+ "checkConstraints": {},
2715
+ "isRLSEnabled": false
2716
+ },
2717
+ "app.organizations": {
2718
+ "name": "organizations",
2719
+ "schema": "app",
2720
+ "columns": {
2721
+ "id": {
2722
+ "name": "id",
2723
+ "type": "text",
2724
+ "primaryKey": true,
2725
+ "notNull": true
2726
+ },
2727
+ "name": {
2728
+ "name": "name",
2729
+ "type": "text",
2730
+ "primaryKey": false,
2731
+ "notNull": true
2732
+ },
2733
+ "slug": {
2734
+ "name": "slug",
2735
+ "type": "text",
2736
+ "primaryKey": false,
2737
+ "notNull": false
2738
+ },
2739
+ "logo": {
2740
+ "name": "logo",
2741
+ "type": "text",
2742
+ "primaryKey": false,
2743
+ "notNull": false
2744
+ },
2745
+ "type": {
2746
+ "name": "type",
2747
+ "type": "text",
2748
+ "primaryKey": false,
2749
+ "notNull": false
2750
+ },
2751
+ "parent_id": {
2752
+ "name": "parent_id",
2753
+ "type": "text",
2754
+ "primaryKey": false,
2755
+ "notNull": false
2756
+ },
2757
+ "created_at": {
2758
+ "name": "created_at",
2759
+ "type": "timestamp with time zone",
2760
+ "primaryKey": false,
2761
+ "notNull": true
2762
+ },
2763
+ "onboarding": {
2764
+ "name": "onboarding",
2765
+ "type": "integer",
2766
+ "primaryKey": false,
2767
+ "notNull": false
2768
+ },
2769
+ "preferences": {
2770
+ "name": "preferences",
2771
+ "type": "jsonb",
2772
+ "primaryKey": false,
2773
+ "notNull": false,
2774
+ "default": "'{}'::jsonb"
2775
+ },
2776
+ "metadata": {
2777
+ "name": "metadata",
2778
+ "type": "jsonb",
2779
+ "primaryKey": false,
2780
+ "notNull": false,
2781
+ "default": "'{}'::jsonb"
2782
+ },
2783
+ "flags": {
2784
+ "name": "flags",
2785
+ "type": "text[]",
2786
+ "primaryKey": false,
2787
+ "notNull": false,
2788
+ "default": "'{}'"
2789
+ },
2790
+ "locale": {
2791
+ "name": "locale",
2792
+ "type": "text",
2793
+ "primaryKey": false,
2794
+ "notNull": false
2795
+ },
2796
+ "currency": {
2797
+ "name": "currency",
2798
+ "type": "text",
2799
+ "primaryKey": false,
2800
+ "notNull": false
2801
+ },
2802
+ "stripe_customer_id": {
2803
+ "name": "stripe_customer_id",
2804
+ "type": "text",
2805
+ "primaryKey": false,
2806
+ "notNull": false
2807
+ },
2808
+ "stripe_sandbox_customer_id": {
2809
+ "name": "stripe_sandbox_customer_id",
2810
+ "type": "text",
2811
+ "primaryKey": false,
2812
+ "notNull": false
2813
+ },
2814
+ "billing_exempt": {
2815
+ "name": "billing_exempt",
2816
+ "type": "boolean",
2817
+ "primaryKey": false,
2818
+ "notNull": true,
2819
+ "default": false
2820
+ },
2821
+ "allow_cardless_trial": {
2822
+ "name": "allow_cardless_trial",
2823
+ "type": "boolean",
2824
+ "primaryKey": false,
2825
+ "notNull": true,
2826
+ "default": false
2827
+ },
2828
+ "cardless_trial_consumed": {
2829
+ "name": "cardless_trial_consumed",
2830
+ "type": "jsonb",
2831
+ "primaryKey": false,
2832
+ "notNull": false,
2833
+ "default": "'{}'::jsonb"
2834
+ },
2835
+ "closed_at": {
2836
+ "name": "closed_at",
2837
+ "type": "timestamp with time zone",
2838
+ "primaryKey": false,
2839
+ "notNull": false
2840
+ }
2841
+ },
2842
+ "indexes": {},
2843
+ "foreignKeys": {
2844
+ "organizations_parent_id_organizations_id_fk": {
2845
+ "name": "organizations_parent_id_organizations_id_fk",
2846
+ "tableFrom": "organizations",
2847
+ "tableTo": "organizations",
2848
+ "schemaTo": "app",
2849
+ "columnsFrom": [
2850
+ "parent_id"
2851
+ ],
2852
+ "columnsTo": [
2853
+ "id"
2854
+ ],
2855
+ "onDelete": "set null",
2856
+ "onUpdate": "no action"
2857
+ }
2858
+ },
2859
+ "compositePrimaryKeys": {},
2860
+ "uniqueConstraints": {
2861
+ "organizations_slug_unique": {
2862
+ "name": "organizations_slug_unique",
2863
+ "nullsNotDistinct": false,
2864
+ "columns": [
2865
+ "slug"
2866
+ ]
2867
+ },
2868
+ "organizations_stripe_customer_id_unique": {
2869
+ "name": "organizations_stripe_customer_id_unique",
2870
+ "nullsNotDistinct": false,
2871
+ "columns": [
2872
+ "stripe_customer_id"
2873
+ ]
2874
+ },
2875
+ "organizations_stripe_sandbox_customer_id_unique": {
2876
+ "name": "organizations_stripe_sandbox_customer_id_unique",
2877
+ "nullsNotDistinct": false,
2878
+ "columns": [
2879
+ "stripe_sandbox_customer_id"
2880
+ ]
2881
+ }
2882
+ },
2883
+ "policies": {},
2884
+ "checkConstraints": {},
2885
+ "isRLSEnabled": false
2886
+ },
2887
+ "app.posts": {
2888
+ "name": "posts",
2889
+ "schema": "app",
2890
+ "columns": {
2891
+ "id": {
2892
+ "name": "id",
2893
+ "type": "text",
2894
+ "primaryKey": true,
2895
+ "notNull": true
2896
+ },
2897
+ "author_user_id": {
2898
+ "name": "author_user_id",
2899
+ "type": "text",
2900
+ "primaryKey": false,
2901
+ "notNull": false
2902
+ },
2903
+ "member_id": {
2904
+ "name": "member_id",
2905
+ "type": "text",
2906
+ "primaryKey": false,
2907
+ "notNull": false
2908
+ },
2909
+ "organization_id": {
2910
+ "name": "organization_id",
2911
+ "type": "text",
2912
+ "primaryKey": false,
2913
+ "notNull": false
2914
+ },
2915
+ "team_id": {
2916
+ "name": "team_id",
2917
+ "type": "text",
2918
+ "primaryKey": false,
2919
+ "notNull": false
2920
+ },
2921
+ "title": {
2922
+ "name": "title",
2923
+ "type": "text",
2924
+ "primaryKey": false,
2925
+ "notNull": true
2926
+ },
2927
+ "slug": {
2928
+ "name": "slug",
2929
+ "type": "text",
2930
+ "primaryKey": false,
2931
+ "notNull": true
2932
+ },
2933
+ "excerpt": {
2934
+ "name": "excerpt",
2935
+ "type": "text",
2936
+ "primaryKey": false,
2937
+ "notNull": false
2938
+ },
2939
+ "content": {
2940
+ "name": "content",
2941
+ "type": "text",
2942
+ "primaryKey": false,
2943
+ "notNull": true
2944
+ },
2945
+ "status": {
2946
+ "name": "status",
2947
+ "type": "text",
2948
+ "primaryKey": false,
2949
+ "notNull": true,
2950
+ "default": "'draft'"
2951
+ },
2952
+ "published_at": {
2953
+ "name": "published_at",
2954
+ "type": "timestamp with time zone",
2955
+ "primaryKey": false,
2956
+ "notNull": false
2957
+ },
2958
+ "created_at": {
2959
+ "name": "created_at",
2960
+ "type": "timestamp with time zone",
2961
+ "primaryKey": false,
2962
+ "notNull": true
2963
+ },
2964
+ "updated_at": {
2965
+ "name": "updated_at",
2966
+ "type": "timestamp with time zone",
2967
+ "primaryKey": false,
2968
+ "notNull": false
2969
+ },
2970
+ "deleted_at": {
2971
+ "name": "deleted_at",
2972
+ "type": "timestamp with time zone",
2973
+ "primaryKey": false,
2974
+ "notNull": false
2975
+ }
2976
+ },
2977
+ "indexes": {},
2978
+ "foreignKeys": {
2979
+ "posts_author_user_id_users_id_fk": {
2980
+ "name": "posts_author_user_id_users_id_fk",
2981
+ "tableFrom": "posts",
2982
+ "tableTo": "users",
2983
+ "schemaTo": "app",
2984
+ "columnsFrom": [
2985
+ "author_user_id"
2986
+ ],
2987
+ "columnsTo": [
2988
+ "id"
2989
+ ],
2990
+ "onDelete": "set null",
2991
+ "onUpdate": "no action"
2992
+ },
2993
+ "posts_member_id_members_id_fk": {
2994
+ "name": "posts_member_id_members_id_fk",
2995
+ "tableFrom": "posts",
2996
+ "tableTo": "members",
2997
+ "schemaTo": "app",
2998
+ "columnsFrom": [
2999
+ "member_id"
3000
+ ],
3001
+ "columnsTo": [
3002
+ "id"
3003
+ ],
3004
+ "onDelete": "set null",
3005
+ "onUpdate": "no action"
3006
+ },
3007
+ "posts_organization_id_organizations_id_fk": {
3008
+ "name": "posts_organization_id_organizations_id_fk",
3009
+ "tableFrom": "posts",
3010
+ "tableTo": "organizations",
3011
+ "schemaTo": "app",
3012
+ "columnsFrom": [
3013
+ "organization_id"
3014
+ ],
3015
+ "columnsTo": [
3016
+ "id"
3017
+ ],
3018
+ "onDelete": "set null",
3019
+ "onUpdate": "no action"
3020
+ }
3021
+ },
3022
+ "compositePrimaryKeys": {},
3023
+ "uniqueConstraints": {
3024
+ "posts_slug_unique": {
3025
+ "name": "posts_slug_unique",
3026
+ "nullsNotDistinct": false,
3027
+ "columns": [
3028
+ "slug"
3029
+ ]
3030
+ }
3031
+ },
3032
+ "policies": {},
3033
+ "checkConstraints": {},
3034
+ "isRLSEnabled": false
3035
+ },
3036
+ "app.sessions": {
3037
+ "name": "sessions",
3038
+ "schema": "app",
3039
+ "columns": {
3040
+ "id": {
3041
+ "name": "id",
3042
+ "type": "text",
3043
+ "primaryKey": true,
3044
+ "notNull": true
3045
+ },
3046
+ "expires_at": {
3047
+ "name": "expires_at",
3048
+ "type": "timestamp with time zone",
3049
+ "primaryKey": false,
3050
+ "notNull": true
3051
+ },
3052
+ "token": {
3053
+ "name": "token",
3054
+ "type": "text",
3055
+ "primaryKey": false,
3056
+ "notNull": true
3057
+ },
3058
+ "created_at": {
3059
+ "name": "created_at",
3060
+ "type": "timestamp with time zone",
3061
+ "primaryKey": false,
3062
+ "notNull": true
3063
+ },
3064
+ "updated_at": {
3065
+ "name": "updated_at",
3066
+ "type": "timestamp with time zone",
3067
+ "primaryKey": false,
3068
+ "notNull": true
3069
+ },
3070
+ "ip_address": {
3071
+ "name": "ip_address",
3072
+ "type": "text",
3073
+ "primaryKey": false,
3074
+ "notNull": false
3075
+ },
3076
+ "user_agent": {
3077
+ "name": "user_agent",
3078
+ "type": "text",
3079
+ "primaryKey": false,
3080
+ "notNull": false
3081
+ },
3082
+ "user_id": {
3083
+ "name": "user_id",
3084
+ "type": "text",
3085
+ "primaryKey": false,
3086
+ "notNull": true
3087
+ },
3088
+ "impersonated_by": {
3089
+ "name": "impersonated_by",
3090
+ "type": "text",
3091
+ "primaryKey": false,
3092
+ "notNull": false
3093
+ },
3094
+ "active_organization_id": {
3095
+ "name": "active_organization_id",
3096
+ "type": "text",
3097
+ "primaryKey": false,
3098
+ "notNull": false
3099
+ },
3100
+ "active_organization_member_id": {
3101
+ "name": "active_organization_member_id",
3102
+ "type": "text",
3103
+ "primaryKey": false,
3104
+ "notNull": false
3105
+ },
3106
+ "active_organization_role": {
3107
+ "name": "active_organization_role",
3108
+ "type": "text",
3109
+ "primaryKey": false,
3110
+ "notNull": false
3111
+ },
3112
+ "active_organization_type": {
3113
+ "name": "active_organization_type",
3114
+ "type": "text",
3115
+ "primaryKey": false,
3116
+ "notNull": false
3117
+ }
3118
+ },
3119
+ "indexes": {},
3120
+ "foreignKeys": {
3121
+ "sessions_user_id_users_id_fk": {
3122
+ "name": "sessions_user_id_users_id_fk",
3123
+ "tableFrom": "sessions",
3124
+ "tableTo": "users",
3125
+ "schemaTo": "app",
3126
+ "columnsFrom": [
3127
+ "user_id"
3128
+ ],
3129
+ "columnsTo": [
3130
+ "id"
3131
+ ],
3132
+ "onDelete": "cascade",
3133
+ "onUpdate": "no action"
3134
+ }
3135
+ },
3136
+ "compositePrimaryKeys": {},
3137
+ "uniqueConstraints": {
3138
+ "sessions_token_unique": {
3139
+ "name": "sessions_token_unique",
3140
+ "nullsNotDistinct": false,
3141
+ "columns": [
3142
+ "token"
3143
+ ]
3144
+ }
3145
+ },
3146
+ "policies": {},
3147
+ "checkConstraints": {},
3148
+ "isRLSEnabled": false
3149
+ },
3150
+ "app.users": {
3151
+ "name": "users",
3152
+ "schema": "app",
3153
+ "columns": {
3154
+ "id": {
3155
+ "name": "id",
3156
+ "type": "text",
3157
+ "primaryKey": true,
3158
+ "notNull": true
3159
+ },
3160
+ "name": {
3161
+ "name": "name",
3162
+ "type": "text",
3163
+ "primaryKey": false,
3164
+ "notNull": true
3165
+ },
3166
+ "email": {
3167
+ "name": "email",
3168
+ "type": "text",
3169
+ "primaryKey": false,
3170
+ "notNull": true
3171
+ },
3172
+ "email_verified": {
3173
+ "name": "email_verified",
3174
+ "type": "boolean",
3175
+ "primaryKey": false,
3176
+ "notNull": true
3177
+ },
3178
+ "image": {
3179
+ "name": "image",
3180
+ "type": "text",
3181
+ "primaryKey": false,
3182
+ "notNull": false
3183
+ },
3184
+ "created_at": {
3185
+ "name": "created_at",
3186
+ "type": "timestamp with time zone",
3187
+ "primaryKey": false,
3188
+ "notNull": true
3189
+ },
3190
+ "updated_at": {
3191
+ "name": "updated_at",
3192
+ "type": "timestamp with time zone",
3193
+ "primaryKey": false,
3194
+ "notNull": true
3195
+ },
3196
+ "role": {
3197
+ "name": "role",
3198
+ "type": "text",
3199
+ "primaryKey": false,
3200
+ "notNull": false
3201
+ },
3202
+ "banned": {
3203
+ "name": "banned",
3204
+ "type": "boolean",
3205
+ "primaryKey": false,
3206
+ "notNull": false
3207
+ },
3208
+ "ban_reason": {
3209
+ "name": "ban_reason",
3210
+ "type": "text",
3211
+ "primaryKey": false,
3212
+ "notNull": false
3213
+ },
3214
+ "ban_expires": {
3215
+ "name": "ban_expires",
3216
+ "type": "timestamp with time zone",
3217
+ "primaryKey": false,
3218
+ "notNull": false
3219
+ },
3220
+ "preferences": {
3221
+ "name": "preferences",
3222
+ "type": "jsonb",
3223
+ "primaryKey": false,
3224
+ "notNull": false,
3225
+ "default": "'{}'::jsonb"
3226
+ },
3227
+ "metadata": {
3228
+ "name": "metadata",
3229
+ "type": "jsonb",
3230
+ "primaryKey": false,
3231
+ "notNull": false,
3232
+ "default": "'{}'::jsonb"
3233
+ },
3234
+ "onboarding": {
3235
+ "name": "onboarding",
3236
+ "type": "integer",
3237
+ "primaryKey": false,
3238
+ "notNull": false
3239
+ },
3240
+ "flags": {
3241
+ "name": "flags",
3242
+ "type": "text[]",
3243
+ "primaryKey": false,
3244
+ "notNull": false,
3245
+ "default": "'{}'"
3246
+ },
3247
+ "locale": {
3248
+ "name": "locale",
3249
+ "type": "text",
3250
+ "primaryKey": false,
3251
+ "notNull": false
3252
+ },
3253
+ "closed_at": {
3254
+ "name": "closed_at",
3255
+ "type": "timestamp with time zone",
3256
+ "primaryKey": false,
3257
+ "notNull": false
3258
+ }
3259
+ },
3260
+ "indexes": {},
3261
+ "foreignKeys": {},
3262
+ "compositePrimaryKeys": {},
3263
+ "uniqueConstraints": {
3264
+ "users_email_unique": {
3265
+ "name": "users_email_unique",
3266
+ "nullsNotDistinct": false,
3267
+ "columns": [
3268
+ "email"
3269
+ ]
3270
+ }
3271
+ },
3272
+ "policies": {},
3273
+ "checkConstraints": {},
3274
+ "isRLSEnabled": false
3275
+ },
3276
+ "app.verifications": {
3277
+ "name": "verifications",
3278
+ "schema": "app",
3279
+ "columns": {
3280
+ "id": {
3281
+ "name": "id",
3282
+ "type": "text",
3283
+ "primaryKey": true,
3284
+ "notNull": true
3285
+ },
3286
+ "identifier": {
3287
+ "name": "identifier",
3288
+ "type": "text",
3289
+ "primaryKey": false,
3290
+ "notNull": true
3291
+ },
3292
+ "value": {
3293
+ "name": "value",
3294
+ "type": "text",
3295
+ "primaryKey": false,
3296
+ "notNull": true
3297
+ },
3298
+ "expires_at": {
3299
+ "name": "expires_at",
3300
+ "type": "timestamp with time zone",
3301
+ "primaryKey": false,
3302
+ "notNull": true
3303
+ },
3304
+ "created_at": {
3305
+ "name": "created_at",
3306
+ "type": "timestamp with time zone",
3307
+ "primaryKey": false,
3308
+ "notNull": false
3309
+ },
3310
+ "updated_at": {
3311
+ "name": "updated_at",
3312
+ "type": "timestamp with time zone",
3313
+ "primaryKey": false,
3314
+ "notNull": false
3315
+ }
3316
+ },
3317
+ "indexes": {},
3318
+ "foreignKeys": {},
3319
+ "compositePrimaryKeys": {},
3320
+ "uniqueConstraints": {},
3321
+ "policies": {},
3322
+ "checkConstraints": {},
3323
+ "isRLSEnabled": false
3324
+ },
3325
+ "app.waitlist": {
3326
+ "name": "waitlist",
3327
+ "schema": "app",
3328
+ "columns": {
3329
+ "id": {
3330
+ "name": "id",
3331
+ "type": "text",
3332
+ "primaryKey": true,
3333
+ "notNull": true
3334
+ },
3335
+ "name": {
3336
+ "name": "name",
3337
+ "type": "text",
3338
+ "primaryKey": false,
3339
+ "notNull": false
3340
+ },
3341
+ "email": {
3342
+ "name": "email",
3343
+ "type": "text",
3344
+ "primaryKey": false,
3345
+ "notNull": false
3346
+ },
3347
+ "created_at": {
3348
+ "name": "created_at",
3349
+ "type": "timestamp with time zone",
3350
+ "primaryKey": false,
3351
+ "notNull": true
3352
+ },
3353
+ "updated_at": {
3354
+ "name": "updated_at",
3355
+ "type": "timestamp with time zone",
3356
+ "primaryKey": false,
3357
+ "notNull": false
3358
+ },
3359
+ "status": {
3360
+ "name": "status",
3361
+ "type": "text",
3362
+ "primaryKey": false,
3363
+ "notNull": true,
3364
+ "default": "'WAITLIST'"
3365
+ },
3366
+ "code": {
3367
+ "name": "code",
3368
+ "type": "text",
3369
+ "primaryKey": false,
3370
+ "notNull": false
3371
+ },
3372
+ "expires_at": {
3373
+ "name": "expires_at",
3374
+ "type": "timestamp with time zone",
3375
+ "primaryKey": false,
3376
+ "notNull": false
3377
+ },
3378
+ "user_id": {
3379
+ "name": "user_id",
3380
+ "type": "text",
3381
+ "primaryKey": false,
3382
+ "notNull": false
3383
+ }
3384
+ },
3385
+ "indexes": {},
3386
+ "foreignKeys": {
3387
+ "waitlist_user_id_users_id_fk": {
3388
+ "name": "waitlist_user_id_users_id_fk",
3389
+ "tableFrom": "waitlist",
3390
+ "tableTo": "users",
3391
+ "schemaTo": "app",
3392
+ "columnsFrom": [
3393
+ "user_id"
3394
+ ],
3395
+ "columnsTo": [
3396
+ "id"
3397
+ ],
3398
+ "onDelete": "no action",
3399
+ "onUpdate": "no action"
3400
+ }
3401
+ },
3402
+ "compositePrimaryKeys": {},
3403
+ "uniqueConstraints": {},
3404
+ "policies": {},
3405
+ "checkConstraints": {},
3406
+ "isRLSEnabled": false
3407
+ },
3408
+ "app.workflows": {
3409
+ "name": "workflows",
3410
+ "schema": "app",
3411
+ "columns": {
3412
+ "id": {
3413
+ "name": "id",
3414
+ "type": "text",
3415
+ "primaryKey": true,
3416
+ "notNull": true
3417
+ },
3418
+ "user_id": {
3419
+ "name": "user_id",
3420
+ "type": "text",
3421
+ "primaryKey": false,
3422
+ "notNull": false
3423
+ },
3424
+ "job_id": {
3425
+ "name": "job_id",
3426
+ "type": "text",
3427
+ "primaryKey": false,
3428
+ "notNull": true
3429
+ },
3430
+ "job_name": {
3431
+ "name": "job_name",
3432
+ "type": "text",
3433
+ "primaryKey": false,
3434
+ "notNull": true
3435
+ },
3436
+ "queue_name": {
3437
+ "name": "queue_name",
3438
+ "type": "text",
3439
+ "primaryKey": false,
3440
+ "notNull": true
3441
+ },
3442
+ "timeout": {
3443
+ "name": "timeout",
3444
+ "type": "integer",
3445
+ "primaryKey": false,
3446
+ "notNull": false
3447
+ },
3448
+ "tags": {
3449
+ "name": "tags",
3450
+ "type": "text[]",
3451
+ "primaryKey": false,
3452
+ "notNull": false
3453
+ },
3454
+ "input": {
3455
+ "name": "input",
3456
+ "type": "jsonb",
3457
+ "primaryKey": false,
3458
+ "notNull": false
3459
+ },
3460
+ "output": {
3461
+ "name": "output",
3462
+ "type": "jsonb",
3463
+ "primaryKey": false,
3464
+ "notNull": false
3465
+ },
3466
+ "status": {
3467
+ "name": "status",
3468
+ "type": "text",
3469
+ "primaryKey": false,
3470
+ "notNull": true
3471
+ },
3472
+ "error": {
3473
+ "name": "error",
3474
+ "type": "text",
3475
+ "primaryKey": false,
3476
+ "notNull": false
3477
+ },
3478
+ "retries": {
3479
+ "name": "retries",
3480
+ "type": "integer",
3481
+ "primaryKey": false,
3482
+ "notNull": true,
3483
+ "default": 0
3484
+ },
3485
+ "finished_at": {
3486
+ "name": "finished_at",
3487
+ "type": "timestamp with time zone",
3488
+ "primaryKey": false,
3489
+ "notNull": false
3490
+ },
3491
+ "processed_at": {
3492
+ "name": "processed_at",
3493
+ "type": "timestamp with time zone",
3494
+ "primaryKey": false,
3495
+ "notNull": false
3496
+ },
3497
+ "created_at": {
3498
+ "name": "created_at",
3499
+ "type": "timestamp with time zone",
3500
+ "primaryKey": false,
3501
+ "notNull": true
3502
+ },
3503
+ "updated_at": {
3504
+ "name": "updated_at",
3505
+ "type": "timestamp with time zone",
3506
+ "primaryKey": false,
3507
+ "notNull": true
3508
+ }
3509
+ },
3510
+ "indexes": {},
3511
+ "foreignKeys": {
3512
+ "workflows_user_id_users_id_fk": {
3513
+ "name": "workflows_user_id_users_id_fk",
3514
+ "tableFrom": "workflows",
3515
+ "tableTo": "users",
3516
+ "schemaTo": "app",
3517
+ "columnsFrom": [
3518
+ "user_id"
3519
+ ],
3520
+ "columnsTo": [
3521
+ "id"
3522
+ ],
3523
+ "onDelete": "cascade",
3524
+ "onUpdate": "no action"
3525
+ }
3526
+ },
3527
+ "compositePrimaryKeys": {},
3528
+ "uniqueConstraints": {
3529
+ "workflows_job_id_unique": {
3530
+ "name": "workflows_job_id_unique",
3531
+ "nullsNotDistinct": false,
3532
+ "columns": [
3533
+ "job_id"
3534
+ ]
3535
+ }
3536
+ },
3537
+ "policies": {},
3538
+ "checkConstraints": {},
3539
+ "isRLSEnabled": false
3540
+ }
3541
+ },
3542
+ "enums": {},
3543
+ "schemas": {
3544
+ "app": "app"
3545
+ },
3546
+ "sequences": {},
3547
+ "roles": {},
3548
+ "policies": {},
3549
+ "views": {},
3550
+ "_meta": {
3551
+ "columns": {},
3552
+ "schemas": {},
3553
+ "tables": {}
3554
+ }
3555
+ }