fix: Handle drizzle 1.0rc in drizzle-adapter #2787

Closed
opened 2026-03-13 10:20:16 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @SkepticMystic on GitHub (Jan 29, 2026).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Upgrade drizzle-orm to 1.0.0-beta.x
  2. Apply drizzle migrations to codebase
  3. Better Auth still uses old (now unsupported) query syntax
  4. Error: Unknown relational filter field: decoder (https://www.answeroverflow.com/m/1398885978202046606)

Current vs. Expected behavior

Eventually the new drizzle syntax should be supported in the adapter

What version of Better Auth are you using?

1.4.18

System info

{
  "system": {
    "platform": "linux",
    "arch": "x64",
    "version": "#91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025",
    "release": "6.8.0-90-generic",
    "cpuCount": 12,
    "cpuModel": "AMD Ryzen 5 3600 6-Core Processor",
    "totalMemory": "31.26 GB",
    "freeMemory": "9.09 GB"
  },
  "node": {
    "version": "v24.13.0",
    "env": "development"
  },
  "packageManager": {
    "name": "pnpm",
    "version": "10.28.1"
  },
  "frameworks": [
    {
      "name": "svelte",
      "version": "^5.49.0"
    },
    {
      "name": "@sveltejs/kit",
      "version": "^2.50.1"
    }
  ],
  "databases": [
    {
      "name": "drizzle",
      "version": "1.0.0-beta.12-a5629fb"
    },
    {
      "name": "@neondatabase/serverless",
      "version": "^1.0.2"
    }
  ],
  "betterAuth": {
    "version": "Unknown",
    "config": null,
    "error": "Cannot find module '$app/paths'\nRequire stack:\n- /home/ross/dev/law-firm/src/lib/const/app.const.ts"
  }
}

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

My `drizzleAdapter` config uses the exact same `db` and `schema` as the rest of the app. Unauthed queries work, but BA queries give the above error

Additional context

No response

Originally created by @SkepticMystic on GitHub (Jan 29, 2026). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Upgrade drizzle-orm to 1.0.0-beta.x 2. Apply drizzle migrations to codebase 3. Better Auth still uses old (now unsupported) query syntax 4. Error: `Unknown relational filter field: decoder` (https://www.answeroverflow.com/m/1398885978202046606) ### Current vs. Expected behavior Eventually the new drizzle syntax should be supported in the adapter ### What version of Better Auth are you using? 1.4.18 ### System info ```bash { "system": { "platform": "linux", "arch": "x64", "version": "#91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025", "release": "6.8.0-90-generic", "cpuCount": 12, "cpuModel": "AMD Ryzen 5 3600 6-Core Processor", "totalMemory": "31.26 GB", "freeMemory": "9.09 GB" }, "node": { "version": "v24.13.0", "env": "development" }, "packageManager": { "name": "pnpm", "version": "10.28.1" }, "frameworks": [ { "name": "svelte", "version": "^5.49.0" }, { "name": "@sveltejs/kit", "version": "^2.50.1" } ], "databases": [ { "name": "drizzle", "version": "1.0.0-beta.12-a5629fb" }, { "name": "@neondatabase/serverless", "version": "^1.0.2" } ], "betterAuth": { "version": "Unknown", "config": null, "error": "Cannot find module '$app/paths'\nRequire stack:\n- /home/ross/dev/law-firm/src/lib/const/app.const.ts" } } ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript My `drizzleAdapter` config uses the exact same `db` and `schema` as the rest of the app. Unauthed queries work, but BA queries give the above error ``` ### Additional context _No response_
GiteaMirror added the adapter label 2026-03-13 10:20:16 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Jan 29, 2026):

It looks like you're encountering an issue with the Drizzle adapter after upgrading to Drizzle 1.0.0-beta.x. The error message you received, Unknown relational filter field: decoder, indicates that Better Auth is still using the old query syntax, which is no longer supported in the latest version of Drizzle ORM.

To address this, it would be best to check the updates on the Better Auth Drizzle adapter that may support the new Drizzle ORM syntax. Currently, there is an open issue that addresses the need to update the adapter for compatibility with the new versions of Drizzle ORM [1].

In the meantime, ensure your Drizzle schema is properly configured and includes all necessary fields as expected by the updated adapter. Re-generating your Better Auth schema using the CLI might help rectify any discrepancies [2].

Would you like assistance with connecting directly to the Better Auth team for further advice on this upgrade?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Jan 29, 2026): It looks like you're encountering an issue with the Drizzle adapter after upgrading to Drizzle 1.0.0-beta.x. The error message you received, `Unknown relational filter field: decoder`, indicates that Better Auth is still using the old query syntax, which is no longer supported in the latest version of Drizzle ORM. To address this, it would be best to check the updates on the Better Auth Drizzle adapter that may support the new Drizzle ORM syntax. Currently, there is an open issue that addresses the need to update the adapter for compatibility with the new versions of Drizzle ORM [[1]](https://github.com/better-auth/better-auth/issues/6766). In the meantime, ensure your Drizzle schema is properly configured and includes all necessary fields as expected by the updated adapter. Re-generating your Better Auth schema using the CLI might help rectify any discrepancies [[2]](https://www.better-auth.com/docs/adapters/drizzle). Would you like assistance with connecting directly to the Better Auth team for further advice on this upgrade? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2787