Studio
Learn how to use Drizzle Studio to view and interact with your database.
Drizzle Studio is a visual database editor that allows you to view and edit your database records directly in your browser.
Start Drizzle Studio
To start Drizzle Studio, run the following command from the root of your project:
npm run db:studioDrizzle Studio will open at https://local.drizzle.studio
Make sure your DATABASE_URL is correctly set in your .env file before starting Drizzle Studio.
Using Drizzle Studio
Drizzle Studio allows you to:
- View all your database tables and data - Browse through all tables and see their records
- Edit records directly in the browser - Update, create, or delete records without writing SQL
- Run queries and see results - Execute SQL queries and view results
- Inspect your database schema - See the structure of your tables, columns, and relationships
Features
Browse Tables
Navigate through all your database tables using the sidebar. Click on any table to view its data.
Edit Records
- Add new records - Click the "Add" button to create new records
- Edit existing records - Click on any cell to edit its value
- Delete records - Select records and delete them
Run Queries
Use the query editor to run custom SQL queries against your database. This is useful for:
- Testing complex queries
- Debugging data issues
- Performing bulk operations
Inspect Schema
View the schema of your tables, including:
- Column names and types
- Primary keys and foreign keys
- Indexes
- Constraints
Alternative Database Tools
While Drizzle Studio is convenient, you can also use other database GUI tools:
- TablePlus - Modern database management tool
- DBeaver - Universal database tool
- pgAdmin - PostgreSQL administration tool
- Postico - PostgreSQL client for macOS
Troubleshooting
Studio won't start
If Drizzle Studio won't start, check:
- Database connection - Ensure
DATABASE_URLis set correctly in.env - Port availability - Make sure port
4983is not already in use - Database running - Verify your database server is running
Can't see tables
If you can't see your tables in Drizzle Studio:
- Check schema - Ensure your schema files are correct
- Run migrations - Make sure all migrations have been applied
- Refresh - Try refreshing the browser