Skip to content

fix(cli): use correct table prefix placeholder for Better Auth + Drizzle + PostgreSQL - #2244

Open
gonzoblasco wants to merge 2 commits into
t3-oss:mainfrom
gonzoblasco:fix/2184-better-auth-drizzle-prefix
Open

fix(cli): use correct table prefix placeholder for Better Auth + Drizzle + PostgreSQL#2244
gonzoblasco wants to merge 2 commits into
t3-oss:mainfrom
gonzoblasco:fix/2184-better-auth-drizzle-prefix

Conversation

@gonzoblasco

Copy link
Copy Markdown

Description

The with-better-auth-postgres schema template had a hardcoded pg-drizzle_ table prefix instead of the project1_ placeholder that the Drizzle installer expects. This caused the scaffolded project to always use pg-drizzle_ as the table prefix regardless of the project name.

Root cause

The Drizzle installer (cli/src/installers/drizzle.ts) replaces project1_${name} with the scoped app name, but the Better Auth + PostgreSQL template was using pg-drizzle_${name} instead.

Changes

  • Changed pg-drizzle_${name} to project1_${name} in with-better-auth-postgres.ts

Fixes #2184

…zle + PostgreSQL

The with-better-auth-postgres template had a hardcoded pg-drizzle_
prefix instead of the project1_ placeholder that the Drizzle installer
expects. This caused the scaffolded project to use pg-drizzle_ as the
table prefix regardless of the project name.

Fixes t3-oss#2184
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 00d0aa0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-t3-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
create-t3-app Ready Ready Preview Jul 30, 2026 6:49pm

Request Review

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.

bug: Incorrect createTable prefix when using Better Auth + Drizzle + PostgreSQL

1 participant