Skip to content

fix: preserve generated schema names for plural aliases - #527

Merged
vitehub-bot[bot] merged 1 commit into
mainfrom
fix/schema-alias-collision-followup
Oct 3, 2026
Merged

vitehub-bot[bot] merged 1 commit into
mainfrom
fix/schema-alias-collision-followup

Conversation

@onmax

@onmax onmax commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

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' } and account: { modelName: 'members' } generate members and memberss; the previous code passed raw model names to the stable alias templates, so both aliases selected members.

This follow-up uses Better Auth's initGetModelName resolver 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=verbose
  • 43 passed
  • git diff --check

Closes the regression identified after #520.

@pullfrog

pullfrog Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

no API key found — this run used openai/gpt-6.1-sol, which needs OPENAI_API_KEY, but the runner has no key for it.

To fix: add the key as a GitHub Actions secret (referenced from your workflow's env: block) or as a Pullfrog secret in the console — or switch this repo to a different model (free models need no key).

Open repo secrets → · Configure model → · Setup docs → · Ask in Discord →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-6.1-sol | 𝕏

@vitehub-bot

vitehub-bot Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
View session Cancelled 2026-10-03T18:24:24.153Z 53s
View session Completed 2026-10-03T18:02:43.372Z 1m 6s
View session Completed 2026-10-03T18:00:34.566Z 1m 42s

Agent stopped: Pull request is no longer open.

Previous results
  • Current session · 2026-10-03T18:03:49.076Z · completed

    Live head is unchanged and mergeable. Required pkg passed, but required ci remains pending; no approvals or actionable review threads are present. Pullfrog failed externally because its runner lacks an API key and is optional. Focused tests (43), lint, typecheck, and diff check passed previously. Wait for the current-head CI/status webhook, then squash-merge.

  • Current session · 2026-10-03T18:02:16.256Z · completed

    Focused schema tests (43 passed), lint, typecheck, and diff check pass. No actionable review findings or threads. Required ci remains in progress; pkg passed. Pullfrog is unavailable because its runner lacks an API key, and is optional. Wait for current-head CI/status webhooks, then merge once required checks and approvals are satisfied.

@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
nuxt-better-auth-docs Ready Ready Preview Oct 3, 2026 6:01pm UTC

@pkg-pr-new

pkg-pr-new Bot commented Oct 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxtjs/better-auth@527

commit: 58d5b26

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@vitehub-bot
vitehub-bot Bot merged commit 5254182 into main Oct 3, 2026
11 of 12 checks passed

This branch was successfully deployed

1 active deployment
Preview — 58d5b263 Deployed Oct 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant