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