[PR #4750] [MERGED] fix(create-adapter): Disable transaction by default #5560

Closed
opened 2026-03-13 12:27:35 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4750
Author: @ping-maxwell
Created: 9/18/2025
Status: Merged
Merged: 9/18/2025
Merged by: @Bekacru

Base: canaryHead: fix/create-adapter-transaction-disabled-default


📝 Commits (2)

  • 206c4ce fix(create-adapter): Disable transaction by default
  • 7ba2f40 set disabled by default

📊 Changes

6 files changed (+9 additions, -6 deletions)

View changed files

📝 packages/better-auth/src/adapters/adapter-factory/index.ts (+3 -1)
📝 packages/better-auth/src/adapters/adapter-factory/types.ts (+2 -1)
📝 packages/better-auth/src/adapters/drizzle-adapter/drizzle-adapter.ts (+1 -1)
📝 packages/better-auth/src/adapters/kysely-adapter/kysely-adapter.ts (+1 -1)
📝 packages/better-auth/src/adapters/mongodb-adapter/mongodb-adapter.ts (+1 -1)
📝 packages/better-auth/src/adapters/prisma-adapter/prisma-adapter.ts (+1 -1)

📄 Description

Summary by cubic

Disable transactions by default in createAdapterFactory so adapters must opt in to transactional behavior. Updates types and docs to reflect transaction: false as the default.

  • Migration
    • If you need transactions, set transaction in AdapterFactoryConfig explicitly.
    • No changes needed if your DB doesn’t support transactions; operations continue sequentially.

🔄 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/4750 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 9/18/2025 **Status:** ✅ Merged **Merged:** 9/18/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/create-adapter-transaction-disabled-default` --- ### 📝 Commits (2) - [`206c4ce`](https://github.com/better-auth/better-auth/commit/206c4ce7bf2e64c5bbe0b0db3d3dc67d6a408de3) fix(create-adapter): Disable transaction by default - [`7ba2f40`](https://github.com/better-auth/better-auth/commit/7ba2f40feff694feac13716773adf52c904d7a96) set disabled by default ### 📊 Changes **6 files changed** (+9 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/adapters/adapter-factory/index.ts` (+3 -1) 📝 `packages/better-auth/src/adapters/adapter-factory/types.ts` (+2 -1) 📝 `packages/better-auth/src/adapters/drizzle-adapter/drizzle-adapter.ts` (+1 -1) 📝 `packages/better-auth/src/adapters/kysely-adapter/kysely-adapter.ts` (+1 -1) 📝 `packages/better-auth/src/adapters/mongodb-adapter/mongodb-adapter.ts` (+1 -1) 📝 `packages/better-auth/src/adapters/prisma-adapter/prisma-adapter.ts` (+1 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Disable transactions by default in createAdapterFactory so adapters must opt in to transactional behavior. Updates types and docs to reflect transaction: false as the default. - **Migration** - If you need transactions, set transaction in AdapterFactoryConfig explicitly. - No changes needed if your DB doesn’t support transactions; operations continue sequentially. <!-- End of auto-generated description by cubic. --> --- <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-03-13 12:27:35 -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#5560