[GH-ISSUE #3148] Add Prisma schema file name for CLI generate #9491

Closed
opened 2026-04-13 04:58:30 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @lucafaggianelli on GitHub (Jun 23, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3148

Is this suited for github?

  • Yes, this is suited for github

I'm using Prisma with multiple schema files (i.e. a prisma/ folder with multiple .prisma files) and when I run the npx @better-auth/cli generate command the main prisma schema file is overwritten, whereas my auth-related schema is in another prisma schema file (prisma/auth.prisma)

Describe the solution you'd like

I'd like to specify the path to the right Prisma schema file in the generate command, something similar to the --config option to specify auth.ts location.

Describe alternatives you've considered

As of today I run the command and then I move the generated schema manually

Additional context

No response

Originally created by @lucafaggianelli on GitHub (Jun 23, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3148 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. I'm using Prisma with multiple schema files (i.e. a `prisma/` folder with multiple `.prisma` files) and when I run the `npx @better-auth/cli generate` command the main prisma schema file is overwritten, whereas my auth-related schema is in another prisma schema file (`prisma/auth.prisma`) ### Describe the solution you'd like I'd like to specify the path to the right Prisma schema file in the `generate` command, something similar to the `--config` option to specify `auth.ts` location. ### Describe alternatives you've considered As of today I run the command and then I move the generated schema manually ### Additional context _No response_
GiteaMirror added the enhancementlocked labels 2026-04-13 04:58:30 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 22, 2025):

Hi, @lucafaggianelli. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested a feature for the npx @better-auth/cli generate command to specify a Prisma schema file path.
  • The goal is to avoid overwriting the main schema when multiple .prisma files exist.
  • Currently, the CLI defaults to the main schema, requiring manual file moves after generation.
  • You suggested adding an option similar to the existing --config flag to specify schema file locations.
  • There has been no further activity or comments on this issue.

Next Steps:

  • Please let me know if this feature request is still relevant with the latest version of better-auth by commenting on this issue.
  • If I do not hear back within 7 days, I will automatically close this issue.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3319921246 --> @dosubot[bot] commented on GitHub (Sep 22, 2025): Hi, @lucafaggianelli. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested a feature for the `npx @better-auth/cli generate` command to specify a Prisma schema file path. - The goal is to avoid overwriting the main schema when multiple `.prisma` files exist. - Currently, the CLI defaults to the main schema, requiring manual file moves after generation. - You suggested adding an option similar to the existing `--config` flag to specify schema file locations. - There has been no further activity or comments on this issue. **Next Steps:** - Please let me know if this feature request is still relevant with the latest version of better-auth by commenting on this issue. - If I do not hear back within 7 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9491