Studio
Learn how to use Prisma Studio to view and interact with your database.
Prisma Studio is a visual database editor that allows you to view and edit your database records directly in your browser.
Start Prisma Studio
To start Prisma Studio, run the following command from the root of your project:
npx prisma studioPrisma Studio will open at http://localhost:5555
Make sure your DATABASE_URL is correctly set in your .env file before starting Prisma Studio.
Using Prisma Studio
Prisma Studio allows you to:
- View all your database tables and data - Browse through all models and see their records
- Edit records directly in the browser - Update, create, or delete records without writing SQL
- Run queries and see results - Execute queries and view results
- Inspect your Prisma schema - See the structure of your models, fields, and relationships
Features
Browse Models
Navigate through all your Prisma models using the sidebar. Click on any model to view its data.
Edit Records
- Add new records - Click the "Add record" button to create new records
- Edit existing records - Click on any field to edit its value
- Delete records - Select records and delete them using the delete button
View Relationships
Prisma Studio shows relationships between models:
- One-to-many - See related records in nested views
- Many-to-many - Manage junction table records
- One-to-one - View linked records
Filter and Search
Use the search and filter features to:
- Find specific records
- Filter by field values
- Sort records by any field
Alternative Database Tools
While Prisma 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 Prisma Studio won't start, check:
- Database connection - Ensure
DATABASE_URLis set correctly in.env - Port availability - Make sure port
5555is not already in use - Database running - Verify your database server is running
- Prisma Client - Run
npx prisma generateif you get client errors
Can't see models
If you can't see your models in Prisma Studio:
- Check schema - Ensure your
schema.prismafile is correct - Run migrations - Make sure all migrations have been applied
- Generate client - Run
npx prisma generateto regenerate the client - Refresh - Try refreshing the browser