[PR #9092] [CLOSED] feat(drizzle-adapter): optional supportsUUIDs override for PostgreSQL #16678

Closed
opened 2026-04-13 10:38:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/9092
Author: @dakaii
Created: 4/10/2026
Status: Closed

Base: mainHead: feat/drizzle-adapter-supports-uuids-config


📝 Commits (1)

  • 0079d88 feat(drizzle-adapter): optional supportsUUIDs override for PostgreSQL

📊 Changes

3 files changed (+88 additions, -3 deletions)

View changed files

📝 docs/content/docs/adapters/drizzle.mdx (+19 -0)
📝 packages/drizzle-adapter/src/drizzle-adapter.test.ts (+57 -2)
📝 packages/drizzle-adapter/src/drizzle-adapter.ts (+12 -1)

📄 Description

Summary

  • Add optional supportsUUIDs to drizzleAdapter config (defaults unchanged).
  • Document PostgreSQL + explicit ids from hooks use case.
  • Unit test: explicit id preserved when supportsUUIDs: false, generateId: "uuid", forceAllowId: true.

Closes #9091


Summary by cubic

Add optional supportsUUIDs to drizzleAdapter so PostgreSQL apps can pass explicit UUID id values when needed (e.g., with database hooks). Defaults are unchanged; no breaking changes.

  • New Features
    • Added supportsUUIDs config: defaults to true for provider: "pg", false otherwise. Set supportsUUIDs: false to keep provided id values, including with generateId: "uuid" and forceAllowId: true.
    • Updated docs with a PostgreSQL + hooks example and added a unit test to confirm explicit UUIDs pass through.

Written for commit 0079d88230. Summary will update on new commits.


🔄 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/9092 **Author:** [@dakaii](https://github.com/dakaii) **Created:** 4/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/drizzle-adapter-supports-uuids-config` --- ### 📝 Commits (1) - [`0079d88`](https://github.com/better-auth/better-auth/commit/0079d8823098786e0a6e4adaddc190175cb5d295) feat(drizzle-adapter): optional supportsUUIDs override for PostgreSQL ### 📊 Changes **3 files changed** (+88 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/adapters/drizzle.mdx` (+19 -0) 📝 `packages/drizzle-adapter/src/drizzle-adapter.test.ts` (+57 -2) 📝 `packages/drizzle-adapter/src/drizzle-adapter.ts` (+12 -1) </details> ### 📄 Description ## Summary - Add optional `supportsUUIDs` to `drizzleAdapter` config (defaults unchanged). - Document PostgreSQL + explicit ids from hooks use case. - Unit test: explicit id preserved when `supportsUUIDs: false`, `generateId: "uuid"`, `forceAllowId: true`. Closes #9091 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add optional `supportsUUIDs` to `drizzleAdapter` so PostgreSQL apps can pass explicit UUID `id` values when needed (e.g., with database hooks). Defaults are unchanged; no breaking changes. - **New Features** - Added `supportsUUIDs` config: defaults to `true` for `provider: "pg"`, `false` otherwise. Set `supportsUUIDs: false` to keep provided `id` values, including with `generateId: "uuid"` and `forceAllowId: true`. - Updated docs with a PostgreSQL + hooks example and added a unit test to confirm explicit UUIDs pass through. <sup>Written for commit 0079d8823098786e0a6e4adaddc190175cb5d295. Summary will update on new commits.</sup> <!-- 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-04-13 10:38:30 -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#16678