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