[PR #1145] [MERGED] refactor: Adapter createSchema return type #11900

Closed
opened 2026-04-13 08:03:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1145
Author: @ping-maxwell
Created: 1/5/2025
Status: Merged
Merged: 1/5/2025
Merged by: @Bekacru

Base: mainHead: refactor/adapter-schema-creator-types


📝 Commits (1)

  • 88e5f4f refactor: Adapter createSchema return type

📊 Changes

1 file changed (+22 additions, -7 deletions)

View changed files

📝 packages/better-auth/src/types/adapter.ts (+22 -7)

📄 Description

  • Extracted the types out so that devs who are creating adapters can infer the type
  • renamed filename to path as some database libraries require the file to be in a specific location.
    • For example with the Convex DB, the schema MUST be in the /convex/schema.ts file.
    • By using path, and setting the dev's project directory as a base, devs can pass relative pathnames including the file name & extension to explicitly define the schema file creation location
  • added JSDoc to each property

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/1145 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 1/5/2025 **Status:** ✅ Merged **Merged:** 1/5/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `refactor/adapter-schema-creator-types` --- ### 📝 Commits (1) - [`88e5f4f`](https://github.com/better-auth/better-auth/commit/88e5f4f60839fbfb2eb8158f4ee3901dfb1e36a0) refactor: Adapter createSchema return type ### 📊 Changes **1 file changed** (+22 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/types/adapter.ts` (+22 -7) </details> ### 📄 Description * Extracted the types out so that devs who are creating adapters can infer the type * renamed `filename` to path as some database libraries require the file to be in a specific location. * For example with the Convex DB, the schema MUST be in the `/convex/schema.ts` file. * By using `path`, and setting the dev's project directory as a base, devs can pass relative pathnames including the file name & extension to explicitly define the schema file creation location * added JSDoc to each property --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 08:03:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#11900