Skip to content

fix(devtools): point Drizzle Studio to correct D1 database file#806

Merged
atinux merged 1 commit intonuxt-hub:mainfrom
onmax:805-drizzle-studio-in-devtools-points-wrong
Jan 29, 2026
Merged

fix(devtools): point Drizzle Studio to correct D1 database file#806
atinux merged 1 commit intonuxt-hub:mainfrom
onmax:805-drizzle-studio-in-devtools-points-wrong

Conversation

@onmax
Copy link
Contributor

@onmax onmax commented Jan 24, 2026

Closes #805

Summary

When driver: 'd1' is set explicitly, Drizzle Studio from devtools created empty .data/db/sqlite.db instead of using wrangler's D1 database. Fix detects D1 driver and finds the correct sqlite file via glob at .wrangler/state/v3/d1/miniflare-D1DatabaseObject/*.sqlite.

StackBlitz

Link Expected
Bug nuxthub-805 ❌ Studio shows empty DB
Fix nuxthub-805-fixed ✅ Studio shows D1 data

CLI Reproduction

git clone --depth 1 --filter=blob:none --sparse https://github.com/onmax/repros.git
cd repros && git sparse-checkout set nuxthub-805
cd nuxthub-805 && pnpm i && pnpm dev

Verify fix

git sparse-checkout add nuxthub-805-fixed
cd ../nuxthub-805-fixed && pnpm i && pnpm dev

The -fixed folder uses pnpm patch to apply the fix locally.

Related

@vercel
Copy link

vercel bot commented Jan 24, 2026

@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 24, 2026

npm i https://pkg.pr.new/@nuxthub/core@806

commit: eb5a326

Copy link
Contributor

@nogic1008 nogic1008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it works well. Thanks!

@atinux atinux merged commit 1e2c6b9 into nuxt-hub:main Jan 29, 2026
7 of 9 checks passed
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.

Drizzle Studio in Devtools points wrong DB in cloudflare-dev emulation

3 participants