[PR #4733] [MERGED] fix: allow disable database transaction #5554

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4733
Author: @himself65
Created: 9/17/2025
Status: Merged
Merged: 9/17/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/08/17/allow-bypass


📝 Commits (3)

  • a64efe4 fix: allow disable database transaction
  • 95ad758 fix: allow disable database transaction
  • afa5c47 test: snap

📊 Changes

4 files changed (+22 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/__snapshots__/init.test.ts.snap (+1 -0)
📝 packages/better-auth/src/adapters/kysely-adapter/dialect.ts (+4 -0)
📝 packages/better-auth/src/db/utils.ts (+3 -1)
📝 packages/better-auth/src/types/options.ts (+14 -0)

📄 Description

Fixes: https://github.com/better-auth/better-auth/issues/4732


Summary by cubic

Adds a transaction flag to BetterAuth database options so you can disable wrapping operations in a DB transaction. This supports drivers without transactions and avoids runtime errors while keeping the default behavior unchanged.

  • New Features
    • database.transaction?: boolean (default true); set false to run operations sequentially without a transaction.
    • Option is propagated through createKyselyAdapter and passed to kyselyAdapter.

🔄 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/4733 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/17/2025 **Status:** ✅ Merged **Merged:** 9/17/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/08/17/allow-bypass` --- ### 📝 Commits (3) - [`a64efe4`](https://github.com/better-auth/better-auth/commit/a64efe4d5c4a3c18bc642d26f59c7b8b3143f4cd) fix: allow disable database transaction - [`95ad758`](https://github.com/better-auth/better-auth/commit/95ad7589529764e96335e10fe9a1f199fe3bad8c) fix: allow disable database transaction - [`afa5c47`](https://github.com/better-auth/better-auth/commit/afa5c4784ff5b678ba3cfd28a65f6ab6238d6bbc) test: snap ### 📊 Changes **4 files changed** (+22 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/__snapshots__/init.test.ts.snap` (+1 -0) 📝 `packages/better-auth/src/adapters/kysely-adapter/dialect.ts` (+4 -0) 📝 `packages/better-auth/src/db/utils.ts` (+3 -1) 📝 `packages/better-auth/src/types/options.ts` (+14 -0) </details> ### 📄 Description Fixes: https://github.com/better-auth/better-auth/issues/4732 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a transaction flag to BetterAuth database options so you can disable wrapping operations in a DB transaction. This supports drivers without transactions and avoids runtime errors while keeping the default behavior unchanged. - **New Features** - database.transaction?: boolean (default true); set false to run operations sequentially without a transaction. - Option is propagated through createKyselyAdapter and passed to kyselyAdapter. <!-- 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:20 -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#5554