Skip to content

fix(auth): align drizzle schema and drop legacy account issuer - #86

Merged
arnabnandy7 merged 1 commit into
mainfrom
fix/authSchemaMismatch
Sep 13, 2026
Merged

arnabnandy7 merged 1 commit into
mainfrom
fix/authSchemaMismatch

Conversation

@arnabnandy7

Copy link
Copy Markdown
Owner

Overview

Aligns the Drizzle auth schema and Turso database tables with Better Auth 1.7.3+ specifications by removing the legacy account.issuer column and its associated index, resolving runtime SCHEMA_MISMATCH errors on sign-in and session verification.

Key Changes

  • Auth Schema: Removed issuer and compound unique index account_issuer_accountId_uidx from src/lib/auth-schema.ts.
  • Database Migration: Added 0015_relax_account_issuer.sql and executed migration script against Preview and Production databases, dropping the unwritten column and index while preserving account data.
  • Documentation: Updated doc/setup.md with migration 15 details.
  • Testing: Added tests/lib/auth-schema.test.ts running @better-auth/core schema diff validation against the Drizzle definition to prevent schema drift regressions.

Verification

  • Vitest: 60/60 test files passed (466 tests)
  • Test Coverage: 97.47% statements, 92.81% branches, 96.95% functions, 98.23% lines
  • Static Analysis: tsc --noEmit and eslint passed with 0 errors
  • Database: Validated schema inspection and record counts on Preview and Production

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@vercel

vercel Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openissue-dev Ready Ready Preview Sep 13, 2026 6:18pm UTC

@arnabnandy7 arnabnandy7 added the bug Something isn't working label Sep 13, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sonarqubecloud

Copy link
Copy Markdown

@arnabnandy7
arnabnandy7 merged commit f556f2f into main Sep 13, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from To Do to Completed in Open issue portal development Sep 13, 2026

This branch was successfully deployed

1 active deployment
Preview — 97c72454 Deployed Sep 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

1 participant