npx skills add ...
npx skills add prisma/cursor-plugin --skill prisma-cli-db-push
npx skills add prisma/cursor-plugin --skill prisma-cli-db-push
prisma db push. Reference when using this Prisma feature.
Pushes schema changes directly to database without creating migrations. Ideal for prototyping.
| 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 explicitlyRequired when changes would delete data (dropping columns, etc.)
Completely resets database and applies schema.
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:
If db push can't apply changes safely:
Decide whether data loss is acceptable, then:
When ready for production, switch to migrations:
Then use migrate dev for future changes.
# 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 neededprisma db push --force-reset
prisma db seedError: The following changes cannot be applied:
- Removing field `email` would cause data loss
Use --accept-data-loss to proceed# Create baseline migration from current schema
prisma migrate dev --name init