Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

db (Prisma CLI v7) (/docs/cli/v7/db)

For the complete Prisma documentation index, see llms.txt. A markdown version of any docs page is available by appending .md to its URL.

Manage your database schema and lifecycle during development

Location: CLI > v7 > db

The prisma db command group provides tools to manage your database schema and lifecycle during development.

Bash
prisma db [command] [options]
Option Description
-h, --help Display help message
--config Custom path to your Prisma config file
--schema Custom path to your Prisma schema
Command Description
prisma db pull Pull the state from the database to the Prisma schema using introspection
prisma db push Push the state from Prisma schema to the database during prototyping
prisma db seed Seed your database
prisma db execute Execute native commands to your database
Bash
# Pull schema from database
prisma db pull

# Push schema to database
prisma db push

# Seed the database
prisma db seed

# Execute a SQL script
prisma db execute --file ./script.sql
  • debug: Display Prisma debug information including schema paths, engine binaries, environment variables, and cache directories for troubleshooting
  • dev: Start a local Prisma Postgres server for development
  • format: Format and validate your Prisma schema file with consistent structure
  • generate: Generate artifacts like Prisma Client based on your Prisma schema
  • init: Set up a new Prisma project in the current directory
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu