fix: preserve generated schema names for plural aliases - #527
Conversation
|
no API key found — this run used To fix: add the key as a GitHub Actions secret (referenced from your workflow's Open repo secrets → · Configure model → · Setup docs → · Ask in Discord →
|
Agent stopped: Pull request is no longer open. Previous results
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
better-auth | 58d5b26 | Commit Preview URL Branch Preview URL |
Oct 03 2026, 06:02 PM |

What changed
PR #520 can export the wrong stable table alias when plural schema generation is enabled and a custom model name already ends in
s. For example,user: { modelName: 'member' }andaccount: { modelName: 'members' }generatemembersandmemberss; the previous code passed raw model names to the stable alias templates, so both aliases selectedmembers.This follow-up uses Better Auth's
initGetModelNameresolver when generating the stable aliases, keeping runtime and declaration exports aligned with the actual generated table identifiers.Validation
pnpm vitest run test/schema-generator.test.ts --reporter=verbosegit diff --checkCloses the regression identified after #520.