Using Drizzle fails on creation due to unsupported use of returning() with MySQL #43

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

Originally created by @inducingchaos on GitHub (Oct 6, 2024).

MySQL itself doesn’t have native support for RETURNING after using INSERT:

https://orm.drizzle.team/docs/insert#insert-returningid

The adapter is using the code for PostgreSQL and SQLite here:

41d81565f5/packages/better-auth/src/adapters/drizzle-adapter/index.ts (L93)

Originally created by @inducingchaos on GitHub (Oct 6, 2024). MySQL itself doesn’t have native support for RETURNING after using INSERT: https://orm.drizzle.team/docs/insert#insert-returningid The adapter is using the code for PostgreSQL and SQLite here: https://github.com/better-auth/better-auth/blob/41d81565f5eeefbca85e356bc793639d4d4c5381/packages/better-auth/src/adapters/drizzle-adapter/index.ts#L93
Author
Owner

@Bekacru commented on GitHub (Oct 10, 2024):

fixed

@Bekacru commented on GitHub (Oct 10, 2024): fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#43