Conversation
Better Auth 1.7 scopes account identity by issuer and adds a required `issuer` column to the `account` table. Bati's hand-maintained schemas were still on the 1.6 shape, so every scaffolded better-auth app broke on sign-up: "table account has no column named issuer". Adds the column to both schemas Bati owns — the wrangler D1 migration and the Drizzle schema (pg + sqlite). The Kysely path needs no change: it creates its tables through Better Auth's own `getMigrations()`. Raises the dependency floor to ^1.7.1 so the shipped schema and the library agree; on 1.6 the new NOT NULL column would have no value to write. Verified with the e2e suite on the three engine paths available locally — cloudflare/D1 (Kysely), sqlite+drizzle and plain sqlite (Kysely migrate) — all 13 tests each, including the `auth: email/password flow` case that was failing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TmqiAZZAABaDst6wAZpUxf
|
Warning Review limit reachedNext included review available in 16 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…vike-b23iof # Conflicts: # boilerplates/better-auth/files/database/drizzle/schema/auth.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every scaffolded better-auth app currently fails on sign-up:
Better Auth 1.7 (published 2026-08-18) scopes account identity by issuer and adds a required
issuercolumn to theaccounttable. Bati declaresbetter-auth: ^1.6.26, so fresh installs resolve 1.7.x while the two schemas Bati maintains by hand are still on the 1.6 shape. It reached CI as dependency drift rather than through any commit — main's last green Tests run predates the 1.7.0 release.Diffing Better Auth's own generated schema between 1.6.30 and 1.7.1 shows the delta is exactly the new column (plus a
account_issuer_accountId_uidxindex — see below):Changes
files/database/migrations/$better-auth.sql.ts— add"issuer" text NOT NULLto the wrangler D1 migration (Cloudflare D1 without an ORM).files/database/drizzle/schema/auth.ts— add the column to theaccounttable, both the pg and sqlite variants.package.json×4 — raise thebetter-authfloor to^1.7.1(the better-auth boilerplate plus the react/solid/vue client boilerplates, kept in lockstep). The shipped schema now requires 1.7: on 1.6 the new NOT NULL column would have no value written to it.bun.lock— resolves to 1.7.1, the version CI already installs.The Kysely path (
better-auth:migrate) needs no change — it builds its tables from Better Auth's owngetMigrations(), so it picked upissueron its own.Not included: Better Auth also generates a unique index
account_issuer_accountId_uidx. Neither schema here carries any of its indexes today (notsession_userId_idx,account_userId_idx, orverification_identifier_idx), and nothing in 1.7 depends on it — there is noON CONFLICTpath in the library — so adding indexes is left as a separate consistency pass.Verification
bun run check-types,bun run lint,bun run testall pass.E2E on the three engine paths that run in this environment, 13/13 tests each, including the
auth: email/password flowcase that was failing:react+hono+cloudflare+better-auth+sqlitereact+fastify+better-auth+sqlite+drizzlereact+hono+better-auth+sqlitebetter-auth:migrate(Kysely)The postgres+drizzle combos could not run locally (no Docker daemon); their schema change is the sibling branch of the same file, and CI covers them.
Generated by Claude Code