create-m5kdev 0.33.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/src/catalog.cjs +21 -1
  2. package/dist/src/catalog.cjs.map +1 -1
  3. package/dist/src/catalog.d.cts +3 -1
  4. package/dist/src/create.cjs +6 -2
  5. package/dist/src/create.cjs.map +1 -1
  6. package/dist/src/doctor.cjs.map +1 -1
  7. package/dist/src/fs.cjs +10 -5
  8. package/dist/src/fs.cjs.map +1 -1
  9. package/dist/src/prompts.cjs +32 -0
  10. package/dist/src/prompts.cjs.map +1 -1
  11. package/dist/src/prompts.d.cts +7 -1
  12. package/dist/src/template.cjs +23 -4
  13. package/dist/src/template.cjs.map +1 -1
  14. package/dist/src/template.d.cts +17 -3
  15. package/dist/src/types.d.cts +11 -4
  16. package/package.json +4 -1
  17. package/templates/minimal-app/.cursor/rules/frontend-data-guide.mdc +1 -0
  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/.cursor/rules/server-event-emit.mdc +41 -0
  23. package/templates/minimal-app/.dockerignore.tpl +31 -0
  24. package/templates/minimal-app/.gitignore.tpl +1 -0
  25. package/templates/minimal-app/AGENTS.md.tpl +14 -10
  26. package/templates/minimal-app/CLAUDE.md.tpl +133 -131
  27. package/templates/minimal-app/README.md.tpl +51 -19
  28. package/templates/minimal-app/apps/e2e/package.json.tpl +23 -23
  29. package/templates/minimal-app/apps/e2e/playwright.config.ts.tpl +51 -39
  30. package/templates/minimal-app/apps/e2e/playwright.expo.config.ts.tpl +38 -38
  31. package/templates/minimal-app/apps/e2e/servers.ts.tpl +136 -112
  32. package/templates/minimal-app/apps/e2e/tests/conversation.spec.ts.tpl +22 -0
  33. package/templates/minimal-app/apps/e2e/tests/email.spec.ts.tpl +47 -47
  34. package/templates/minimal-app/apps/e2e/tests/expo-helpers.ts.tpl +73 -73
  35. package/templates/minimal-app/apps/e2e/tests/expo-standard.spec.ts.tpl +517 -517
  36. package/templates/minimal-app/apps/e2e/tests/expo-waitlist.spec.ts.tpl +94 -94
  37. package/templates/minimal-app/apps/e2e/tests/files.spec.ts.tpl +35 -0
  38. package/templates/minimal-app/apps/e2e/tests/helpers.ts.tpl +289 -289
  39. package/templates/minimal-app/apps/e2e/tests/standard.spec.ts.tpl +516 -516
  40. package/templates/minimal-app/apps/e2e/tests/waitlist.spec.ts.tpl +107 -107
  41. package/templates/minimal-app/apps/e2e/tests/workflow.spec.ts.tpl +26 -0
  42. package/templates/minimal-app/apps/e2e/tsconfig.json.tpl +10 -10
  43. package/templates/minimal-app/apps/email/package.json.tpl +34 -34
  44. package/templates/minimal-app/apps/email/src/emails/trialEndingEmail.tsx.tpl +40 -0
  45. package/templates/minimal-app/apps/email/src/index.ts.tpl +7 -0
  46. package/templates/minimal-app/apps/email/src/resources.ts.tpl +72 -65
  47. package/templates/minimal-app/apps/expo/app.json.tpl +36 -36
  48. package/templates/minimal-app/apps/expo/eslint.config.js.tpl +8 -8
  49. package/templates/minimal-app/apps/expo/metro.config.js.tpl +16 -16
  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/src/App.tsx.tpl +12 -0
  75. package/templates/minimal-app/apps/landing/src/LandingPage.tsx.tpl +37 -0
  76. package/templates/minimal-app/apps/landing/src/index.css.tpl +24 -0
  77. package/templates/minimal-app/apps/landing/src/main.tsx.tpl +16 -0
  78. package/templates/minimal-app/apps/landing/src/vite-env.d.ts.tpl +11 -0
  79. package/templates/minimal-app/apps/landing/tsconfig.json.tpl +12 -0
  80. package/templates/minimal-app/apps/landing/vite.config.ts.tpl +25 -0
  81. package/templates/minimal-app/apps/server/AGENTS.md.tpl +55 -46
  82. package/templates/minimal-app/apps/server/{drizzle/seed.e2e.ts.tpl → db.e2e.ts.tpl} +57 -40
  83. package/templates/minimal-app/apps/server/{drizzle/seed.ts.tpl → db.ts.tpl} +27 -20
  84. package/templates/minimal-app/apps/server/drizzle/0003_silly_the_liberteens.sql +27 -0
  85. package/templates/minimal-app/apps/server/drizzle/meta/0000_snapshot.json.tpl +56 -166
  86. package/templates/minimal-app/apps/server/drizzle/meta/0001_snapshot.json.tpl +1796 -1910
  87. package/templates/minimal-app/apps/server/drizzle/meta/0002_snapshot.json.tpl +1818 -1932
  88. package/templates/minimal-app/apps/server/drizzle/meta/0003_snapshot.json.tpl +2137 -0
  89. package/templates/minimal-app/apps/server/drizzle/meta/_journal.json.tpl +8 -1
  90. package/templates/minimal-app/apps/server/drizzle.config.ts.tpl +3 -33
  91. package/templates/minimal-app/apps/server/package.json.tpl +5 -3
  92. package/templates/minimal-app/apps/server/src/app.ts.tpl +36 -0
  93. package/templates/minimal-app/apps/server/src/modules/conversation/conversation.mastra.ts.tpl +26 -0
  94. package/templates/minimal-app/apps/server/src/modules/demo-workflow/demo-workflow.module.ts.tpl +51 -0
  95. package/templates/minimal-app/apps/server/src/modules/demo-workflow/demo-workflow.service.ts.tpl +51 -0
  96. package/templates/minimal-app/apps/server/src/modules/demo-workflow/demo-workflow.trpc.ts.tpl +16 -0
  97. package/templates/minimal-app/apps/server/src/modules/posts/posts.db.ts.tpl +28 -28
  98. package/templates/minimal-app/apps/server/src/modules/posts/posts.grants.ts.tpl +28 -28
  99. package/templates/minimal-app/apps/server/src/modules/posts/posts.module.ts.tpl +57 -54
  100. package/templates/minimal-app/apps/server/src/modules/posts/posts.repository.ts.tpl +67 -67
  101. package/templates/minimal-app/apps/server/src/modules/posts/posts.service.ts.tpl +116 -116
  102. package/templates/minimal-app/apps/server/src/modules/posts/posts.trpc.ts.tpl +37 -37
  103. package/templates/minimal-app/apps/server/src/modules/test-harness/test-harness.module.ts.tpl +279 -279
  104. package/templates/minimal-app/apps/server/src/schema.ts.tpl +31 -20
  105. package/templates/minimal-app/apps/server/src/types.ts.tpl +12 -12
  106. package/templates/minimal-app/apps/server/tsconfig.json.tpl +1 -1
  107. package/templates/minimal-app/apps/server/tsup.config.ts.tpl +23 -9
  108. package/templates/minimal-app/apps/shared/.env.example.tpl +5 -0
  109. package/templates/minimal-app/apps/shared/.env.production.example.tpl +23 -0
  110. package/templates/minimal-app/apps/shared/.env.tpl +5 -0
  111. package/templates/minimal-app/apps/shared/Dockerfile.tpl +48 -0
  112. package/templates/minimal-app/apps/shared/fly.toml.tpl +24 -0
  113. package/templates/minimal-app/apps/shared/package.json.tpl +26 -24
  114. package/templates/minimal-app/apps/shared/src/modules/app/app.constants.ts.tpl +28 -28
  115. package/templates/minimal-app/apps/shared/src/modules/conversation/conversation.constants.ts.tpl +1 -0
  116. package/templates/minimal-app/apps/shared/src/modules/demo-workflow/demo-workflow.constants.ts.tpl +1 -0
  117. package/templates/minimal-app/apps/shared/src/modules/notification/notification.schema.ts.tpl +3 -3
  118. package/templates/minimal-app/apps/shared/src/modules/posts/posts.constants.ts.tpl +5 -5
  119. package/templates/minimal-app/apps/shared/src/modules/posts/posts.schema.ts.tpl +25 -25
  120. package/templates/minimal-app/apps/webapp/package.json.tpl +53 -53
  121. package/templates/minimal-app/apps/webapp/public/push-sw.js.tpl +34 -34
  122. package/templates/minimal-app/apps/webapp/src/App.tsx.tpl +49 -44
  123. package/templates/minimal-app/apps/webapp/src/Layout.tsx.tpl +96 -65
  124. package/templates/minimal-app/apps/webapp/src/Router.tsx.tpl +114 -93
  125. package/templates/minimal-app/apps/webapp/src/StarterServerEventProvider.tsx.tpl +38 -0
  126. package/templates/minimal-app/apps/webapp/src/index.css.tpl +15 -15
  127. package/templates/minimal-app/apps/webapp/src/main.tsx.tpl +26 -26
  128. package/templates/minimal-app/apps/webapp/src/modules/conversation/ConversationRoute.tsx.tpl +36 -0
  129. package/templates/minimal-app/apps/webapp/src/modules/files/FilesRoute.tsx.tpl +88 -0
  130. package/templates/minimal-app/apps/webapp/src/modules/files/hooks/useFilesRoute.ts.tpl +50 -0
  131. package/templates/minimal-app/apps/webapp/src/modules/workflows/WorkflowsRoute.tsx.tpl +97 -0
  132. package/templates/minimal-app/apps/webapp/src/modules/workflows/hooks/useWorkflowsRoute.ts.tpl +64 -0
  133. package/templates/minimal-app/apps/webapp/src/utils/i18n.ts.tpl +13 -13
  134. package/templates/minimal-app/apps/webapp/src/utils/trpc.ts.tpl +10 -10
  135. package/templates/minimal-app/apps/webapp/src/vite-env.d.ts.tpl +1 -1
  136. package/templates/minimal-app/apps/webapp/translations/en/app.json.tpl +7 -7
  137. package/templates/minimal-app/apps/webapp/translations/en/{{APP_SLUG}}.json.tpl +193 -135
  138. package/templates/minimal-app/apps/webapp/tsconfig.json.tpl +17 -17
  139. package/templates/minimal-app/apps/webapp/vite.config.ts.tpl +31 -31
  140. package/templates/minimal-app/biome.json.tpl +17 -12
  141. package/templates/minimal-app/package.json.tpl +7 -2
  142. package/templates/minimal-app/pnpm-workspace.yaml.tpl +14 -7
  143. package/templates/minimal-app/template.manifest.json +93 -2
  144. package/templates/minimal-app/apps/server/drizzle/db.ts.tpl +0 -26
  145. package/templates/minimal-app/apps/server/drizzle/guard.ts.tpl +0 -36
  146. package/templates/minimal-app/apps/server/drizzle/reset.ts.tpl +0 -40
  147. package/templates/minimal-app/apps/server/drizzle/sync.ts.tpl +0 -16
@@ -1,15 +1,27 @@
1
+ import { type RunDbSeedContext, runDb } from "@m5kdev/backend/db";
1
2
  import { hashPassword } from "better-auth/crypto";
2
3
  import { eq } from "drizzle-orm";
3
4
  import { v4 as uuidv4 } from "uuid";
4
- import { isRemote, orm, schema } from "./db";
5
- import { ensureDevServerStopped } from "./guard";
5
+ import * as schema from "./src/schema";
6
6
 
7
7
  const DEMO_EMAIL = "admin{{PACKAGE_SCOPE}}.local";
8
8
  const DEMO_PASSWORD = "password1234";
9
9
  const ORGANIZATION_ID = "{{APP_SLUG}}-org";
10
10
  const TEAM_ID = "{{APP_SLUG}}-team";
11
11
 
12
- async function ensureDemoUser() {
12
+ void runDb({
13
+ schema,
14
+ seed: async ({ orm }) => {
15
+ const user = await ensureDemoUser(orm);
16
+ const { organizationId, teamId } = await ensureOrganization({ orm, userId: user.id });
17
+ await seedPosts({ orm, userId: user.id, organizationId, teamId });
18
+ console.info(`Seed completed. Demo login: ${DEMO_EMAIL} / ${DEMO_PASSWORD}`);
19
+ },
20
+ });
21
+
22
+ type SeedOrm = RunDbSeedContext<typeof schema>["orm"];
23
+
24
+ async function ensureDemoUser(orm: SeedOrm): Promise<typeof schema.users.$inferSelect> {
13
25
  const [existingUser] = await orm
14
26
  .select()
15
27
  .from(schema.users)
@@ -51,7 +63,11 @@ async function ensureDemoUser() {
51
63
  return user;
52
64
  }
53
65
 
54
- async function ensureOrganization(userId: string) {
66
+ async function ensureOrganization(input: {
67
+ orm: SeedOrm;
68
+ userId: string;
69
+ }): Promise<{ organizationId: string; teamId: string }> {
70
+ const { orm, userId } = input;
55
71
  const [existingOrganization] = await orm
56
72
  .select()
57
73
  .from(schema.organizations)
@@ -119,7 +135,13 @@ async function ensureOrganization(userId: string) {
119
135
  return { organizationId: ORGANIZATION_ID, teamId: TEAM_ID };
120
136
  }
121
137
 
122
- async function seedPosts(userId: string, organizationId: string | null, teamId: string | null) {
138
+ async function seedPosts(input: {
139
+ orm: SeedOrm;
140
+ userId: string;
141
+ organizationId: string | null;
142
+ teamId: string;
143
+ }): Promise<void> {
144
+ const { orm, userId, organizationId, teamId } = input;
123
145
  const existingPosts = await orm.select().from(schema.posts).limit(1);
124
146
  if (existingPosts.length > 0) {
125
147
  return;
@@ -166,18 +188,3 @@ async function seedPosts(userId: string, organizationId: string | null, teamId:
166
188
  },
167
189
  ]);
168
190
  }
169
-
170
- async function seed() {
171
- await ensureDevServerStopped();
172
- if (isRemote) {
173
- await orm.$client.sync();
174
- }
175
- const user = await ensureDemoUser();
176
- const { organizationId, teamId } = await ensureOrganization(user.id);
177
-
178
- await seedPosts(user.id, organizationId, teamId);
179
-
180
- console.info(`Seed completed. Demo login: ${DEMO_EMAIL} / ${DEMO_PASSWORD}`);
181
- }
182
-
183
- void seed();
@@ -0,0 +1,27 @@
1
+ CREATE TABLE `files` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `created_at` integer NOT NULL,
4
+ `updated_at` integer,
5
+ `deleted_at` integer,
6
+ `user_id` text,
7
+ `member_id` text,
8
+ `organization_id` text,
9
+ `team_id` text,
10
+ `bucket` text NOT NULL,
11
+ `key` text NOT NULL,
12
+ `original_name` text NOT NULL,
13
+ `original_extension` text,
14
+ `content_type` text NOT NULL,
15
+ `size_bytes` integer,
16
+ `etag` text,
17
+ `checksum_sha256` text,
18
+ `metadata` text,
19
+ `status` text NOT NULL,
20
+ `uploaded_at` integer,
21
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE set null,
22
+ FOREIGN KEY (`member_id`) REFERENCES `members`(`id`) ON UPDATE no action ON DELETE set null,
23
+ FOREIGN KEY (`organization_id`) REFERENCES `organizations`(`id`) ON UPDATE no action ON DELETE set null,
24
+ FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE set null
25
+ );
26
+ --> statement-breakpoint
27
+ CREATE UNIQUE INDEX `files_bucket_key_unique` ON `files` (`bucket`,`key`);
@@ -70,12 +70,8 @@
70
70
  "name": "account_claim_magic_links_claim_id_waitlist_id_fk",
71
71
  "tableFrom": "account_claim_magic_links",
72
72
  "tableTo": "waitlist",
73
- "columnsFrom": [
74
- "claim_id"
75
- ],
76
- "columnsTo": [
77
- "id"
78
- ],
73
+ "columnsFrom": ["claim_id"],
74
+ "columnsTo": ["id"],
79
75
  "onDelete": "cascade",
80
76
  "onUpdate": "no action"
81
77
  },
@@ -83,12 +79,8 @@
83
79
  "name": "account_claim_magic_links_user_id_users_id_fk",
84
80
  "tableFrom": "account_claim_magic_links",
85
81
  "tableTo": "users",
86
- "columnsFrom": [
87
- "user_id"
88
- ],
89
- "columnsTo": [
90
- "id"
91
- ],
82
+ "columnsFrom": ["user_id"],
83
+ "columnsTo": ["id"],
92
84
  "onDelete": "cascade",
93
85
  "onUpdate": "no action"
94
86
  }
@@ -198,12 +190,8 @@
198
190
  "name": "accounts_user_id_users_id_fk",
199
191
  "tableFrom": "accounts",
200
192
  "tableTo": "users",
201
- "columnsFrom": [
202
- "user_id"
203
- ],
204
- "columnsTo": [
205
- "id"
206
- ],
193
+ "columnsFrom": ["user_id"],
194
+ "columnsTo": ["id"],
207
195
  "onDelete": "cascade",
208
196
  "onUpdate": "no action"
209
197
  }
@@ -369,12 +357,8 @@
369
357
  "name": "apikeys_user_id_users_id_fk",
370
358
  "tableFrom": "apikeys",
371
359
  "tableTo": "users",
372
- "columnsFrom": [
373
- "user_id"
374
- ],
375
- "columnsTo": [
376
- "id"
377
- ],
360
+ "columnsFrom": ["user_id"],
361
+ "columnsTo": ["id"],
378
362
  "onDelete": "no action",
379
363
  "onUpdate": "no action"
380
364
  }
@@ -456,12 +440,8 @@
456
440
  "name": "invitations_organization_id_organizations_id_fk",
457
441
  "tableFrom": "invitations",
458
442
  "tableTo": "organizations",
459
- "columnsFrom": [
460
- "organization_id"
461
- ],
462
- "columnsTo": [
463
- "id"
464
- ],
443
+ "columnsFrom": ["organization_id"],
444
+ "columnsTo": ["id"],
465
445
  "onDelete": "no action",
466
446
  "onUpdate": "no action"
467
447
  },
@@ -469,12 +449,8 @@
469
449
  "name": "invitations_team_id_teams_id_fk",
470
450
  "tableFrom": "invitations",
471
451
  "tableTo": "teams",
472
- "columnsFrom": [
473
- "team_id"
474
- ],
475
- "columnsTo": [
476
- "id"
477
- ],
452
+ "columnsFrom": ["team_id"],
453
+ "columnsTo": ["id"],
478
454
  "onDelete": "no action",
479
455
  "onUpdate": "no action"
480
456
  },
@@ -482,12 +458,8 @@
482
458
  "name": "invitations_inviter_id_users_id_fk",
483
459
  "tableFrom": "invitations",
484
460
  "tableTo": "users",
485
- "columnsFrom": [
486
- "inviter_id"
487
- ],
488
- "columnsTo": [
489
- "id"
490
- ],
461
+ "columnsFrom": ["inviter_id"],
462
+ "columnsTo": ["id"],
491
463
  "onDelete": "no action",
492
464
  "onUpdate": "no action"
493
465
  }
@@ -572,12 +544,8 @@
572
544
  "name": "members_organization_id_organizations_id_fk",
573
545
  "tableFrom": "members",
574
546
  "tableTo": "organizations",
575
- "columnsFrom": [
576
- "organization_id"
577
- ],
578
- "columnsTo": [
579
- "id"
580
- ],
547
+ "columnsFrom": ["organization_id"],
548
+ "columnsTo": ["id"],
581
549
  "onDelete": "no action",
582
550
  "onUpdate": "no action"
583
551
  },
@@ -585,12 +553,8 @@
585
553
  "name": "members_user_id_users_id_fk",
586
554
  "tableFrom": "members",
587
555
  "tableTo": "users",
588
- "columnsFrom": [
589
- "user_id"
590
- ],
591
- "columnsTo": [
592
- "id"
593
- ],
556
+ "columnsFrom": ["user_id"],
557
+ "columnsTo": ["id"],
594
558
  "onDelete": "no action",
595
559
  "onUpdate": "no action"
596
560
  }
@@ -677,16 +641,12 @@
677
641
  "indexes": {
678
642
  "notification_devices_endpoint_unique": {
679
643
  "name": "notification_devices_endpoint_unique",
680
- "columns": [
681
- "endpoint"
682
- ],
644
+ "columns": ["endpoint"],
683
645
  "isUnique": true
684
646
  },
685
647
  "notification_devices_token_unique": {
686
648
  "name": "notification_devices_token_unique",
687
- "columns": [
688
- "token"
689
- ],
649
+ "columns": ["token"],
690
650
  "isUnique": true
691
651
  }
692
652
  },
@@ -695,12 +655,8 @@
695
655
  "name": "notification_devices_user_id_users_id_fk",
696
656
  "tableFrom": "notification_devices",
697
657
  "tableTo": "users",
698
- "columnsFrom": [
699
- "user_id"
700
- ],
701
- "columnsTo": [
702
- "id"
703
- ],
658
+ "columnsFrom": ["user_id"],
659
+ "columnsTo": ["id"],
704
660
  "onDelete": "cascade",
705
661
  "onUpdate": "no action"
706
662
  }
@@ -810,12 +766,8 @@
810
766
  "name": "notification_send_logs_user_id_users_id_fk",
811
767
  "tableFrom": "notification_send_logs",
812
768
  "tableTo": "users",
813
- "columnsFrom": [
814
- "user_id"
815
- ],
816
- "columnsTo": [
817
- "id"
818
- ],
769
+ "columnsFrom": ["user_id"],
770
+ "columnsTo": ["id"],
819
771
  "onDelete": "cascade",
820
772
  "onUpdate": "no action"
821
773
  },
@@ -823,12 +775,8 @@
823
775
  "name": "notification_send_logs_device_id_notification_devices_id_fk",
824
776
  "tableFrom": "notification_send_logs",
825
777
  "tableTo": "notification_devices",
826
- "columnsFrom": [
827
- "device_id"
828
- ],
829
- "columnsTo": [
830
- "id"
831
- ],
778
+ "columnsFrom": ["device_id"],
779
+ "columnsTo": ["id"],
832
780
  "onDelete": "cascade",
833
781
  "onUpdate": "no action"
834
782
  }
@@ -931,9 +879,7 @@
931
879
  "indexes": {
932
880
  "organizations_slug_unique": {
933
881
  "name": "organizations_slug_unique",
934
- "columns": [
935
- "slug"
936
- ],
882
+ "columns": ["slug"],
937
883
  "isUnique": true
938
884
  }
939
885
  },
@@ -942,12 +888,8 @@
942
888
  "name": "organizations_parent_id_organizations_id_fk",
943
889
  "tableFrom": "organizations",
944
890
  "tableTo": "organizations",
945
- "columnsFrom": [
946
- "parent_id"
947
- ],
948
- "columnsTo": [
949
- "id"
950
- ],
891
+ "columnsFrom": ["parent_id"],
892
+ "columnsTo": ["id"],
951
893
  "onDelete": "set null",
952
894
  "onUpdate": "no action"
953
895
  }
@@ -1055,9 +997,7 @@
1055
997
  "indexes": {
1056
998
  "posts_slug_unique": {
1057
999
  "name": "posts_slug_unique",
1058
- "columns": [
1059
- "slug"
1060
- ],
1000
+ "columns": ["slug"],
1061
1001
  "isUnique": true
1062
1002
  }
1063
1003
  },
@@ -1066,12 +1006,8 @@
1066
1006
  "name": "posts_author_user_id_users_id_fk",
1067
1007
  "tableFrom": "posts",
1068
1008
  "tableTo": "users",
1069
- "columnsFrom": [
1070
- "author_user_id"
1071
- ],
1072
- "columnsTo": [
1073
- "id"
1074
- ],
1009
+ "columnsFrom": ["author_user_id"],
1010
+ "columnsTo": ["id"],
1075
1011
  "onDelete": "set null",
1076
1012
  "onUpdate": "no action"
1077
1013
  },
@@ -1079,12 +1015,8 @@
1079
1015
  "name": "posts_organization_id_organizations_id_fk",
1080
1016
  "tableFrom": "posts",
1081
1017
  "tableTo": "organizations",
1082
- "columnsFrom": [
1083
- "organization_id"
1084
- ],
1085
- "columnsTo": [
1086
- "id"
1087
- ],
1018
+ "columnsFrom": ["organization_id"],
1019
+ "columnsTo": ["id"],
1088
1020
  "onDelete": "set null",
1089
1021
  "onUpdate": "no action"
1090
1022
  },
@@ -1092,12 +1024,8 @@
1092
1024
  "name": "posts_team_id_teams_id_fk",
1093
1025
  "tableFrom": "posts",
1094
1026
  "tableTo": "teams",
1095
- "columnsFrom": [
1096
- "team_id"
1097
- ],
1098
- "columnsTo": [
1099
- "id"
1100
- ],
1027
+ "columnsFrom": ["team_id"],
1028
+ "columnsTo": ["id"],
1101
1029
  "onDelete": "set null",
1102
1030
  "onUpdate": "no action"
1103
1031
  }
@@ -1218,9 +1146,7 @@
1218
1146
  "indexes": {
1219
1147
  "sessions_token_unique": {
1220
1148
  "name": "sessions_token_unique",
1221
- "columns": [
1222
- "token"
1223
- ],
1149
+ "columns": ["token"],
1224
1150
  "isUnique": true
1225
1151
  }
1226
1152
  },
@@ -1229,12 +1155,8 @@
1229
1155
  "name": "sessions_user_id_users_id_fk",
1230
1156
  "tableFrom": "sessions",
1231
1157
  "tableTo": "users",
1232
- "columnsFrom": [
1233
- "user_id"
1234
- ],
1235
- "columnsTo": [
1236
- "id"
1237
- ],
1158
+ "columnsFrom": ["user_id"],
1159
+ "columnsTo": ["id"],
1238
1160
  "onDelete": "cascade",
1239
1161
  "onUpdate": "no action"
1240
1162
  }
@@ -1288,12 +1210,8 @@
1288
1210
  "name": "teammembers_team_id_teams_id_fk",
1289
1211
  "tableFrom": "teammembers",
1290
1212
  "tableTo": "teams",
1291
- "columnsFrom": [
1292
- "team_id"
1293
- ],
1294
- "columnsTo": [
1295
- "id"
1296
- ],
1213
+ "columnsFrom": ["team_id"],
1214
+ "columnsTo": ["id"],
1297
1215
  "onDelete": "no action",
1298
1216
  "onUpdate": "no action"
1299
1217
  },
@@ -1301,12 +1219,8 @@
1301
1219
  "name": "teammembers_user_id_users_id_fk",
1302
1220
  "tableFrom": "teammembers",
1303
1221
  "tableTo": "users",
1304
- "columnsFrom": [
1305
- "user_id"
1306
- ],
1307
- "columnsTo": [
1308
- "id"
1309
- ],
1222
+ "columnsFrom": ["user_id"],
1223
+ "columnsTo": ["id"],
1310
1224
  "onDelete": "no action",
1311
1225
  "onUpdate": "no action"
1312
1226
  }
@@ -1360,12 +1274,8 @@
1360
1274
  "name": "teams_organization_id_organizations_id_fk",
1361
1275
  "tableFrom": "teams",
1362
1276
  "tableTo": "organizations",
1363
- "columnsFrom": [
1364
- "organization_id"
1365
- ],
1366
- "columnsTo": [
1367
- "id"
1368
- ],
1277
+ "columnsFrom": ["organization_id"],
1278
+ "columnsTo": ["id"],
1369
1279
  "onDelete": "no action",
1370
1280
  "onUpdate": "no action"
1371
1281
  }
@@ -1524,23 +1434,17 @@
1524
1434
  "indexes": {
1525
1435
  "users_email_unique": {
1526
1436
  "name": "users_email_unique",
1527
- "columns": [
1528
- "email"
1529
- ],
1437
+ "columns": ["email"],
1530
1438
  "isUnique": true
1531
1439
  },
1532
1440
  "users_stripe_customer_id_unique": {
1533
1441
  "name": "users_stripe_customer_id_unique",
1534
- "columns": [
1535
- "stripe_customer_id"
1536
- ],
1442
+ "columns": ["stripe_customer_id"],
1537
1443
  "isUnique": true
1538
1444
  },
1539
1445
  "users_payment_customer_id_unique": {
1540
1446
  "name": "users_payment_customer_id_unique",
1541
- "columns": [
1542
- "payment_customer_id"
1543
- ],
1447
+ "columns": ["payment_customer_id"],
1544
1448
  "isUnique": true
1545
1449
  }
1546
1450
  },
@@ -1704,12 +1608,8 @@
1704
1608
  "name": "waitlist_user_id_users_id_fk",
1705
1609
  "tableFrom": "waitlist",
1706
1610
  "tableTo": "users",
1707
- "columnsFrom": [
1708
- "user_id"
1709
- ],
1710
- "columnsTo": [
1711
- "id"
1712
- ],
1611
+ "columnsFrom": ["user_id"],
1612
+ "columnsTo": ["id"],
1713
1613
  "onDelete": "no action",
1714
1614
  "onUpdate": "no action"
1715
1615
  },
@@ -1717,12 +1617,8 @@
1717
1617
  "name": "waitlist_claim_user_id_users_id_fk",
1718
1618
  "tableFrom": "waitlist",
1719
1619
  "tableTo": "users",
1720
- "columnsFrom": [
1721
- "claim_user_id"
1722
- ],
1723
- "columnsTo": [
1724
- "id"
1725
- ],
1620
+ "columnsFrom": ["claim_user_id"],
1621
+ "columnsTo": ["id"],
1726
1622
  "onDelete": "no action",
1727
1623
  "onUpdate": "no action"
1728
1624
  }
@@ -1851,9 +1747,7 @@
1851
1747
  "indexes": {
1852
1748
  "workflows_job_id_unique": {
1853
1749
  "name": "workflows_job_id_unique",
1854
- "columns": [
1855
- "job_id"
1856
- ],
1750
+ "columns": ["job_id"],
1857
1751
  "isUnique": true
1858
1752
  }
1859
1753
  },
@@ -1862,12 +1756,8 @@
1862
1756
  "name": "workflows_user_id_users_id_fk",
1863
1757
  "tableFrom": "workflows",
1864
1758
  "tableTo": "users",
1865
- "columnsFrom": [
1866
- "user_id"
1867
- ],
1868
- "columnsTo": [
1869
- "id"
1870
- ],
1759
+ "columnsFrom": ["user_id"],
1760
+ "columnsTo": ["id"],
1871
1761
  "onDelete": "cascade",
1872
1762
  "onUpdate": "no action"
1873
1763
  }
@@ -1887,4 +1777,4 @@
1887
1777
  "internal": {
1888
1778
  "indexes": {}
1889
1779
  }
1890
- }
1780
+ }