-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: add CLI to launch Drizzle Studio #13157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
…s and clean up drizzleStudio.ts and index.ts by removing workspace package handling code
I'm pausing this PR for now as I'm running into a technical difficulty that's taking longer than expected to resolve, and there are other higher priority matters to address at the moment. But if anyone wants to contribute, that would be great!
These packages currently have their The technical challenge is that drizzle-kit runs in a separate process and doesn't inherit TypeScript loaders, so there's a fundamental conflict between our development setup (which uses TypeScript source files) and drizzle-kit's requirements (which needs compiled JavaScript). Interestingly, this change is required in the |
Sometimes it's very useful to see the raw table structure for debugging purposes. This PR introduces a new command,
pnpx payload drizzle:studio
, which runs Drizzle Studio if you're using payload with our Postgres or SQLite adapters.To test this in the current PR:
PAYLOAD_DATABASE=postgres pnpm dev fields
pnpm build:all
node packages/payload/bin.js drizzle:studio
in another terminal.After the next release,
pnpx payload drizzle:studio
should work also in the monorepo. I intend to document this command once it's released and I've been able to test it in a fresh project.