skills/prisma-cli-db-push/SKILL.md
prisma db push. Reference when using this Prisma feature.
npx skillsauth add prisma/cursor-plugin prisma-cli-db-pushInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Pushes schema changes directly to database without creating migrations. Ideal for prototyping.
prisma db push [options]
| Option | Description |
|--------|-------------|
| --force-reset | Force a reset of the database before push |
| --accept-data-loss | Ignore data loss warnings |
| --schema | Custom path to your Prisma schema |
| --config | Custom path to your Prisma config file |
| --url | Override the datasource URL from the Prisma config file |
--skip-generate - Run prisma generate explicitlyprisma db push
prisma db push --accept-data-loss
Required when changes would delete data (dropping columns, etc.)
prisma db push --force-reset
Completely resets database and applies schema.
prisma db push
prisma generate # Must run explicitly in v7
migrate deploy| Feature | db push | migrate dev | |---------|---------|-------------| | Creates migration files | No | Yes | | Tracks history | No | Yes | | Requires shadow database | No | Yes | | Speed | Faster | Slower | | Rollback capability | No | Yes | | Best for | Prototyping | Development |
MongoDB doesn't support migrations. Use db push exclusively:
# Schema changes for MongoDB
prisma db push
prisma generate
# Make schema changes
# ...
# Push to database
prisma db push
# Generate client
prisma generate
# Test your changes
# Repeat as needed
prisma db push --force-reset
prisma db seed
If db push can't apply changes safely:
Error: The following changes cannot be applied:
- Removing field `email` would cause data loss
Use --accept-data-loss to proceed
Decide whether data loss is acceptable, then:
prisma db push --accept-data-loss
When ready for production, switch to migrations:
# Create baseline migration from current schema
prisma migrate dev --name init
Then use migrate dev for future changes.
databases
Schema Changes. Reference when using this Prisma feature.
tools
Removed Features. Reference when using this Prisma feature.
tools
Prisma Config. Reference when using this Prisma feature.
tools
ESM Support. Reference when using this Prisma feature.