prisma-cli-migrate-reset
द्वारा prisma
prisma माइग्रेट रीसेट
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-cli-migrate-resetprisma migrate reset
Resets your database and re-applies all migrations.
Command
prisma migrate reset [options]
What It Does
- Drops the database (if possible) or deletes all data/tables
- Re-creates the database
- Applies all migrations from
prisma/migrations/ - Runs the seed script (if configured)
Warning: All data will be lost.
Options
| Option | Description |
|---|---|
--force / -f | Skip confirmation prompt |
--schema | Path to schema file |
--config | Custom path to your Prisma config file |
Examples
Basic reset
prisma migrate reset
Prompts for confirmation in interactive terminals.
Force reset (CI/Automation)
prisma migrate reset --force
With custom schema
prisma migrate reset --schema=./custom/schema.prisma
When to Use
- Development: When you want a fresh start
- Testing: Resetting test database before suites
- Drift Recovery: When the database is out of sync and you can't migrate
Behavior in v7
- In v6,
migrate resetautomatically ranprisma generate. - In v7, you may need to run
prisma generateseparately if you want to update the client, thoughresetfocuses on the database state. - Seed script IS run by default after reset.
Configuration
Configure seed script in prisma.config.ts to run it automatically after reset:
export default defineConfig({
migrations: {
seed: 'tsx prisma/seed.ts',
},
})
prisma की और Skills
prisma-cli-migrate-status
prisma
prisma माइग्रेट स्थिति
official
prisma-cli-studio
prisma
prisma स्टूडियो। इस Prisma सुविधा का उपयोग करते समय संदर्भ।
official
prisma-cli-validate
prisma
prisma वैधता। इस Prisma सुविधा का उपयोग करते समय संदर्भ।
official
prisma-cli-db-execute
prisma
prisma db execute. इस Prisma सुविधा का उपयोग करते समय संदर्भ।
official
prisma-cli-db-pull
prisma
prisma-cli-db-pull — AI एजेंटों के लिए एक इंस्टॉल करने योग्य कौशल, prisma/cursor-plugin द्वारा प्रकाशित।
official
prisma-cli-db-push
prisma
prisma db push। इस Prisma सुविधा का उपयोग करते समय संदर्भ।
official
prisma-cli-db-seed
prisma
prisma db seed। इस Prisma सुविधा का उपयोग करते समय संदर्भ के लिए।
official
prisma-cli-debug
prisma
prisma डिबग। इस Prisma सुविधा का उपयोग करते समय संदर्भ।
official