Back to Prisma

db

apps/docs/content/docs/cli/db/index.mdx

latest1.4 KB
Original Source

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

Usage

bash
prisma db [command] [options]

Global options

OptionDescription
-h, --helpDisplay help message
--configCustom path to your Prisma config file
--schemaCustom path to your Prisma schema

Subcommands

CommandDescription
prisma db pullPull the state from the database to the Prisma schema using introspection
prisma db pushPush the state from Prisma schema to the database during prototyping
prisma db seedSeed your database
prisma db executeExecute native commands to your database

Examples

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