Export mergeSchema for plugin developers #566

Closed
opened 2026-03-13 07:53:18 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jamesjulich on GitHub (Jan 15, 2025).

Is this suited for github?

  • Yes, this is suited for github

The mergeSchema function is not accessible outside of the better-auth project. This means that third-party plugin developers cannot use it in their plugins.

Describe the solution you'd like

Export the mergeSchema function so that third-party plugin developers can allow schema to be customized.

Describe alternatives you've considered

Copy/pasting the function into own plugin (not a great solution because it duplicates code and the schema shape may change over time)

Additional context

No response

Originally created by @jamesjulich on GitHub (Jan 15, 2025). ### Is this suited for github? - [X] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. The mergeSchema function is not accessible outside of the better-auth project. This means that third-party plugin developers cannot use it in their plugins. ### Describe the solution you'd like Export the mergeSchema function so that third-party plugin developers can allow schema to be customized. ### Describe alternatives you've considered Copy/pasting the function into own plugin (not a great solution because it duplicates code and the schema shape may change over time) ### Additional context _No response_
Author
Owner

@Bekacru commented on GitHub (Jan 18, 2025):

you should be able to import it now from "better-auth/db"

@Bekacru commented on GitHub (Jan 18, 2025): you should be able to import it now from "better-auth/db"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#566